I have created a React+Vite project and trying to install Shadcn in the project (using Ubuntu Linux). However I am not able to add shadcn and every time I follow the steps with the help of their docs it's showing me the following errors:
How can I resolve this?
I have created a React+Vite project and trying to install Shadcn in the project (using Ubuntu Linux). However I am not able to add shadcn and every time I follow the steps with the help of their docs it's showing me the following errors:
How can I resolve this?
Share Improve this question edited Feb 11 at 10:01 rozsazoltan 9,4455 gold badges19 silver badges43 bronze badges asked Feb 2 at 12:40 Ayush RanjanAyush Ranjan 111 bronze badge 3- See meta.stackoverflow/questions/285551/… . This tailwind package doesn't contain binaries so you can't expect the command to exist. See tailwindcss/docs/installation/tailwind-cli . This is not related to Shadcn – Estus Flask Commented Feb 2 at 12:51
- This question is similar to: Error: 'could not determine executable to run' when initializing Tailwind CSS with shadcn/ui. If you believe it’s different, please edit the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem. – rozsazoltan Commented Feb 9 at 15:25
- And: How to upgrade your Shadcn project from TailwindCSS v3 to v4 – rozsazoltan Commented Feb 11 at 10:01
1 Answer
Reset to default 1The Shadcn installation steps are currently outdated. Tailwind 4 was just released a couple of weeks ago and changed the CLI.
You can either explicitly run Tailwind 3:
npm install -D tailwindcss@3 postcss autoprefixer
npx tailwindcss@3 init -p
or follow Tailwind 4's installation steps for Vite: https://tailwindcss/docs/installation/using-vite