admin管理员组文章数量:1307837
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
本文标签: reactjsError in setting up Shadcn in ReactVite projectStack Overflow
版权声明:本文标题:reactjs - Error in setting up Shadcn in React + Vite project - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741847936a2400893.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论