最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

reactjs - Error in setting up Shadcn in React + Vite project - Stack Overflow

programmeradmin0浏览0评论

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
Add a comment  | 

1 Answer 1

Reset to default 1

The 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

发布评论

评论列表(0)

  1. 暂无评论