-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Description
Describe the bug
I have tried to install shadcn on my existing nextjs repo, where I have tailwind v4 installed. However, when i install shadcn, this pops up
`
MyMacbookAir business-review-site % pnpm dlx shadcn@latest init
✔ Preflight checks.
✔ Verifying framework. Found Next.js.
✖ Validating Tailwind CSS config. Found v4.
✔ Validating import alias.
No Tailwind CSS configuration found at /Users/hardi/Documents/Business/review-site/code/business-review-site.
It is likely you do not have Tailwind CSS installed or have an invalid configuration.
Install Tailwind CSS then try again.
Visit https://tailwindcss.com/docs/guides/nextjs to get started.
`
I tried installing and uninstalling tailwind, and various other workarounds (like creating a ts.config file for tailwind to try spoof the cli, but its not working? how to fix and what is going on)
Affected component/components
CLI installation
How to reproduce
-
Have an existing repo created in nextjs ( i simply used npx create-next-app@latest to create my repo), and in this install tailwind.
-
run pnpm dlx shadcn@latest init to install shadcn
Codesandbox/StackBlitz link
No response
Logs
System Info
If it helps, this is my current package.json for my project
{
"name": "business-review-site",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev --turbopack",
"build": "next build",
"start": "next start",
"lint": "next lint",
"lint:fix": "next lint --fix",
"db:push": "drizzle-kit push",
"db:generate": "drizzle-kit generate",
"db:studio": "drizzle-kit studio"
},
"dependencies": {
"@neondatabase/serverless": "^1.0.1",
"@vercel/postgres": "^0.10.0",
"better-auth": "^1.3.4",
"chart.js": "^4.5.0",
"cookie-signature": "^1.2.2",
"dotenv": "^17.2.0",
"drizzle-orm": "^0.44.4",
"lucide-react": "^0.536.0",
"next": "15.4.5",
"number-to-words": "^1.2.4",
"postcss": "^8.5.6",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"uuid": "^11.1.0"
},
"devDependencies": {
"@eslint/eslintrc": "^3",
"@tailwindcss/postcss": "^4.1.11",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"drizzle-kit": "^0.31.4",
"eslint": "^8.57.1",
"eslint-config-next": "15.3.2",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-unused-imports": "^4.1.4",
"sass": "^1.89.0",
"tailwindcss": "^4.1.11",
"typescript": "^5"
}
}
Before submitting
- I've made research efforts and searched the documentation
- I've searched for existing issues