script command not found npm Origin: Build & delivery Last updated 13 Oct 2026

sh: vite: command not found (npm script)

A tool used in an npm script isn’t installed in node_modules/.bin.

Exact message you may see command not foundis not recognized as an internal or external command
Seen on: npm

Meaning

Dev dependencies weren’t installed (NODE_ENV=production / --omit=dev), node_modules is missing, or the tool was never added to package.json.

Common causes

  • npm install not run
  • Dev dependencies skipped (--production, NODE_ENV=production)
  • Tool not listed in package.json

⚡ Quick fix

  1. npm install (including dev deps)
  2. Add the tool: npm i -D vite
  3. In Docker builds, install dev deps for the build stage

Detailed fix by platform

npm

  1. npm ci --include=dev && npm run build

How to diagnose

  1. Installed — node_modules/.bin/tool exists?
  2. Env — NODE_ENV=production during install?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Build & delivery. Errors that are often confused with or caused by this one (click to open):

0x8007007E — 0x8007007E: The specified module could not be found (Windows)0x8007007Ecommand not found — bash: command not found (Linux)command not foundDependency requires compileSdk — Dependency 'androidx.x:1.y' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs (Android)Dependency requires c…E404 — npm ERR! code E404 — 404 Not Found: package@version is not in this registry (npm)E404EBADPLATFORM — npm ERR! code EBADPLATFORM — notsup Unsupported platform for fsevents: wanted {"os":"darwin"} (current: {"os":"linux"}) (npm)EBADPLATFORMELIFECYCLE — npm ERR! code ELIFECYCLE / Command failed with exit code 1 (npm)ELIFECYCLEELSPROBLEMS — npm ERR! code ELSPROBLEMS — invalid / extraneous / missing packages in npm ls (npm)ELSPROBLEMSEOVERRIDE — npm ERR! code EOVERRIDE — Override for x conflicts with direct dependency (npm)EOVERRIDEscript co…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.