The error, verbatim
Jump to the fix ↓$ npx tailwindcss init
npm error could not determine executable to run
npm error A complete log of this run can be found in: ...\npm-cache\_logs\...-debug-0.log
Tested on
- tailwindcss
- 4.3.3 (and 3.4.19)
- CLI
- @tailwindcss/cli 4.3.3
- Node / npm
- 24.14.0 / 11.9.0
- OS
- Windows 11 Pro; Ubuntu and Windows Server on GitHub Actions (November 2)
✓ Last re-run on GitHub Actions · see the run · all repros
Contents
The fix
npm i tailwindcss now installs Tailwind CSS v4, and v4 has no init command. It doesn’t use a tailwind.config.js by default either. That’s why npx finds nothing to run: the tailwindcss package no longer ships a command-line tool at all.
Pick the fix that matches what you want.
Option 1: use v4 the new way (recommended)
Skip init. Install the CLI package, then point it at a CSS file that imports Tailwind:
npm install -D tailwindcss @tailwindcss/cli/* src/input.css */
@import "tailwindcss";npx @tailwindcss/cli -i ./src/input.css -o ./dist/output.css --watchThat’s the whole setup. There’s no config file and no content array, because v4 finds your class names on its own.
If you use Vite, Next.js or another framework, use its plugin instead of the CLI (@tailwindcss/vite, or @tailwindcss/postcss for PostCSS setups). The CSS file is the same.
Option 2: stay on v3 because a tutorial or template expects it
Pin the old major version and init works again:
npm install -D tailwindcss@3
npx tailwindcss initWhy it happens
Before v4, the tailwindcss package included a CLI, so npx tailwindcss init ran it and created tailwind.config.js. In v4 the CLI moved to its own package, @tailwindcss/cli, and configuration moved into your CSS using @theme. In the installed v4 package there’s no executable at all, not even a node_modules/.bin folder, so npm can’t work out what to run.
Most tutorials and courses were written for v3. That’s why so many people hit this on their very first command.
Already have a tailwind.config.js?
v4 ignores it unless you point to it. In my test, a custom brand colour from the config produced no text-brand class until I added one line to the CSS:
@import "tailwindcss";
@config "../tailwind.config.js";
After that, .text-brand { color: #c8410f; } appeared in the output. It’s a good bridge while you move settings into @theme.
What didn’t work
How this was tested
November 2, 2026: re-run on GitHub Actions ubuntu-latest and windows-latest (Node 24.22.1, npm 11.19.1). With tailwindcss 4.3.3, npx tailwindcss init and npx tailwindcss@latest init both failed with could not determine executable to run; with @tailwindcss/cli installed it printed Invalid command: init and created nothing; the v4 CLI build produced .text-3xl and .underline; and tailwindcss 3.4.19 printed Created Tailwind CSS config file: tailwind.config.js. The script and output are public.
— N.K., end of entry No.007