There have been several updates in TailwindCSS v4.
The installation process has changed:
Some older features have been deprecated:
npx tailwindcss
to npx @tailwindcss/cli
- TailwindCSS v4 Docsnpx tailwindcss init
process - StackOverflow@config
directive to legacy JavaScript-config - StackOverflowA CSS-first configuration has been implemented:
tailwind.config.js
- TailwindCSS v4 Docsnpm i tailwindcss
installs v4 by default. To install v3, use:
npm install -D tailwindcss@3
Why aren't the tailwind.config.js and postcss.config.js files being generated automatically when running the installation commands?
The init process has been removed. There is no longer a need for tailwind.config.js
, so nothing is automatically created anymore. However, you can still make it available using the @config
directive and create it manually.
How can I resolve the error npm ERR! could not determine executable to run when initializing Tailwind CSS or Shadcn UI?
This error typically occurs when there is an issue with the command being run, such as a missing or incorrect executable. From the context, I infer that you're trying to run the init
process, but as I mentioned, it has been deprecated.
Is there a specific configuration or prerequisite I might be missing for setting up Shadcn UI in a React.js (Vite + JavaScript) project?