#27 most commondependenciesBolt.newReplitCursorWindsurfLovable

sh: vite: command not found (exit code 127)

sh: 1: vite: not found / jsh: command not found: vite / Command failed with exit code 127: npm run build

Got a slightly different error? Paste the exact message and get a fix prompt tailored to it.

Paste your error →

What it means

The tool your app needs to start or build isn't installed in this environment. Usually the install step never finished or a package went missing from the dependency list.

How to fix it: paste this prompt into your AI builder

Fix prompt for Lovable, Bolt, Cursor, Replit, Windsurf
My project fails with "vite/next: command not found" (exit 127). Check package.json: make sure the build tool (vite / next / react-scripts) is listed in dependencies or devDependencies with a valid version, the scripts reference it correctly, and package-lock.json is present. Then run a clean npm install and npm run dev/build. If npm install fails with ERESOLVE, fix that conflict first. Don't change app code.

If the AI can't fix it: manual steps

  1. In the terminal, run: npm install then npm run dev.
  2. On a host, make sure the build command is just 'npm run build' and the install isn't skipped.

Where this happens

Seen in these AI app builders and editors:

Bolt.newReplitCursorWindsurfLovable

Sources

Related dependencies errors

Still stuck? Paste your full error and UnstuckMyVibe will match it and hand you the exact fix prompt.

Fix my error →