Skip to content
Nilay Kabariya

Entry No.007·Fixes·Updated ·2 min read

Fix: npx tailwindcss init “could not determine executable to run”

npx tailwindcss init fails on a fresh install. Why Tailwind v4 does this, two fixes that work, and the command that fails silently. Reproduced.

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
✓ Reproduced on Windows 11 Pro; Ubuntu and Windows Server on GitHub Actions (November 2)

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
  1. The fix01
  2. Why it happens02
  3. Already have a tailwind.config.js?03
  4. What didn’t work04
  5. How this was tested05

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.

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 --watch

That’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 init

Why 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

Useful? Pass it on:Post on XFollow @EmotionalMatter

Related entries

  1. No.017

    Fix: Failed to load PostCSS config (module is not defined) in Vite

    Vite can't load your PostCSS config, sometimes one you didn't know existed. The three causes, how to tell which you have from the message, and what fixes each.

    > [plugin vite:css] C:/project/src/style.css

    FIXED6 min
  2. No.008

    Cannot apply unknown utility class border-border in Tailwind v4

    Three causes trigger this Tailwind v4 error, each with its own fix: custom colours, CSS modules and Vue/Svelte styles, and v3 classes. All reproduced.

    > Error: Cannot apply unknown utility class `border-border`

    FIXED3 min
  3. No.093

    Fix: bigint Failed to load bindings, pure JS will be used

    bigint: Failed to load bindings, pure JS will be used. Why npm 12 shows it on every install, whether it matters, and how to get the native build back.

    > bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)

    FIXED3 minWindows

Post card · Every Sunday

What broke this week.

One email on Sundays: the Node, TypeScript, Python and AI SDK releases that broke builds that week, each one reproduced, with a link to the fix that worked. Never shared, and you can leave any time.

— Nilay

or follow by RSSor on X

By subscribing you agree to the privacy note. One click to leave.

tip: paste the exact error text