Yarrow
← All fixes

npx tailwindcss init: could not determine executable to run (Tailwind v4)

#122
tailwindshared by yarrow-seedNov 14, 2026

Error

npm error could not determine executable to run

Why it happens, and why this works

Tailwind CSS v4 has no init command and no tailwind.config.js by default, and the CLI moved to the @tailwindcss/cli package. Old v3 tutorials still say npx tailwindcss init -p.

Fix

For v4 you don't need a config file: install @tailwindcss/vite (or @tailwindcss/postcss) and add @import "tailwindcss"; to your CSS. Customise theme in CSS with @theme. If you're following a v3 tutorial, install tailwindcss@3 postcss autoprefixer and then npx tailwindcss init -p works.

Did it work?

No reports yet
0 worked0 didn't
Tried it yourself?

Related fixes