Quick fix: "npm error could not determine executable to run" means npx could not find a command in the package you named. Nine times out of ten the command was npx tailwindcss init -p: Tailwind CSS v4 removed init, and the tailwindcss package no longer ships the CLI. Follow the v4 setup in step 2 (no config file needed), or install v3 on purpose with npm install -D tailwindcss@3 postcss autoprefixer. For any other tool, check which package really provides that command (step 4).
Type "npm error" into Google and "npm error could not determine executable to run" is the first suggestion, with "npx tailwindcss init not working", "npx tailwindcss init error" and "could not determine executable to run tailwindcss" close behind. The Tailwind CSS GitHub discussion about it has more than 170 replies. The error is confusing because the install step just worked, so it feels like npm is broken. It is not: npx is telling you that the package you installed has no command by that name. This guide explains why npm error could not determine executable to run appears and fixes it in order, quickest first.
Why "could not determine executable to run" happens
When you run npx something (the same as npm exec), npm treats something as a package name and reads the bin field in that package's package.json. The npm docs describe the rules: if the package has a single bin entry, that command runs; if it has several, npm picks the one that matches the package name; otherwise npm exec "exits with an error". That error is the one you are seeing. We reproduced it on November 24, 2026 by installing tailwindcss 4.3.5 with npm 10.9.9 and running npx tailwindcss init -p; npm view tailwindcss bin prints nothing for v4, while v3 lists tailwind and tailwindcss. The usual reasons are:
- The package no longer has that command. In Tailwind CSS v4 the CLI moved to
@tailwindcss/cli, sonpx tailwindcssfinds nothing to run. - The command was removed. A Tailwind maintainer answered in the discussion: "The
initcommand no longer exists in v4." - The command comes from a different package. Remotion's docs give the example that the
remotioncommand comes from@remotion/cli, not fromremotion. - The project uses another package manager. With Corepack, a
packageManagerfield for pnpm or Yarn can makenpxfail the same way.
How to fix npm error could not determine executable to run
Work through these steps in order and try your command again after each one.
- Check the exact command you copied. If it is
npx tailwindcss initornpx tailwindcss init -p, the tutorial was written for Tailwind CSS v3. Since early 2025 a plainnpm install tailwindcssinstalls v4, so the two halves of the tutorial no longer match. Decide whether you want v4 (step 2) or v3 (step 3). - Set up Tailwind CSS v4 the new way. Tailwind v4 needs no
initstep and notailwind.config.jsto get started. Pick the setup that matches your project, as shown in the official install guides.Vite (React, Vue, Svelte and so on):
npm install tailwindcss @tailwindcss/vite// vite.config.ts import { defineConfig } from 'vite' import tailwindcss from '@tailwindcss/vite' export default defineConfig({ plugins: [ tailwindcss(), ], })PostCSS (Next.js and other PostCSS setups):
npm install tailwindcss @tailwindcss/postcss postcss// postcss.config.mjs export default { plugins: { "@tailwindcss/postcss": {}, }, }Standalone CLI:
npm install tailwindcss @tailwindcss/cli npx @tailwindcss/cli -i ./src/input.css -o ./src/output.css --watchIn every case, replace the old
@tailwind base; @tailwind components; @tailwind utilities;lines in your main CSS file with one line:@import "tailwindcss"; - Or install Tailwind CSS v3 on purpose. If a course, theme or existing project depends on v3, add the version qualifier, as the Tailwind maintainer recommends:
This createsnpm install -D tailwindcss@3 postcss autoprefixer npx tailwindcss init -ptailwind.config.jsandpostcss.config.jsas older tutorials expect. To move a v3 project forward later, Tailwind providesnpx @tailwindcss/upgrade(it needs Node.js 20 or newer; run it on a new git branch). - Make sure the package that owns the command is installed. For tools other than Tailwind, the command name and package name often differ. Check which commands a package provides, then install the right one:
Ifnpm view @remotion/cli bin npm install -D @remotion/cli ls node_modules/.binnpm viewprints nothing forbin, that package has no command at all, which is exactly when this error appears. - Tell npx which package to use. When the command lives in a package with another name, the npm docs say to pass
--packageso npm stops guessing from the first word:
Withnpx --package=@tailwindcss/cli tailwindcss -i input.css -o output.cssnpx, put all flags before the command name. - Use your project's package manager. Open
package.json. If it has apackageManagerfield such as"pnpm@9.0.0", run tools withpnpm exec; useyarnfor Yarn andbunxfor Bun, as Remotion's troubleshooting page suggests. - Reinstall dependencies if the command is still missing. If the package is listed in
package.jsonbutnode_modules/.binhas no entry for it, the install did not finish. Runnpm installagain, or delete thenode_modulesfolder and runnpm install. This will not help when the package has no such command, so do steps 1 to 4 first.
If nothing works
Run npx --version and node --version, then try the command in a brand-new folder: npm init -y and install only the one package. If it works there, something in your project (a packageManager field, a workspace setup or a broken install) is the cause. For Tailwind, read the official installation guides for your framework and the GitHub discussion on this error. For other packages, check the tool's own docs for its exact command and package name.
Building a mobile app instead? React Native projects run many tools through npx; our free React Native track and the React Native weather app tutorial show the current commands. For a full web stack, see the Full-Stack Development track.
Frequently asked questions
What does npm error could not determine executable to run mean?
npx (npm exec) could not work out which command to run from the package you named. It looks at the package's bin field; if the package has no matching executable, npm exits with this error.
Why does npx tailwindcss init not work anymore?
Tailwind CSS v4 is now the default install, and a Tailwind maintainer confirmed that the init command no longer exists in v4. In v4 the CLI lives in the separate @tailwindcss/cli package and configuration is done in CSS, so you do not need a tailwind.config.js to start.
How do I create tailwind.config.js in Tailwind v4?
You usually do not need one. Tailwind v4 is configured in your CSS file. If you must use a v3-style JavaScript config, the upgrade guide says to load it explicitly with the @config directive, because v4 does not detect it automatically.
Can I still use Tailwind CSS v3?
Yes. Install it with a version qualifier, npm install -D tailwindcss@3 postcss autoprefixer, and then npx tailwindcss init -p works as it did before.
Does deleting node_modules fix could not determine executable to run?
Only when the package is listed in package.json but was not installed properly. If the package simply has no executable with that name, as with tailwindcss v4, reinstalling will not help; use the right package or command instead.
Sources and further reading
- npm docs: npm exec (how npx chooses the executable)
- Tailwind CSS GitHub discussion 15820: "could not determine executable to run"
- Tailwind CSS v4 upgrade guide
- Tailwind CSS: install with Vite
- Tailwind CSS: install with PostCSS
- Tailwind CSS: install the Tailwind CLI
- Remotion docs: could not determine executable to run
Last checked November 24, 2026 against docs.npmjs.com and tailwindcss.com. Install commands change between major versions, so confirm them in the official guides.