← All fixes
npm error Missing script: "dev"
#83Error
npm error Missing script: "dev" npm error To see a list of scripts, run: npm error npm run
Why it happens, and why this works
npm run <name> only runs scripts listed under "scripts" in the package.json of the folder you're in. Either you're in the wrong folder (often the repo root instead of the app folder), or the project names it something else (start, serve, develop).
Fix
Run `npm run` to list the scripts this package.json has. If the app lives in a subfolder, cd into it first. If the script is genuinely missing, add it, e.g. npm pkg set scripts.dev="vite" (or "next dev", "node app.js").
Did it work?
No reports yet0 worked0 didn't
Tried it yourself?
Related fixes
TypeError: list indices must be integers or slices, not str (JSON list treated as a dict)
#76TypeError: list indices must be integers or slices, not str
pythonVerifiedNo reports yet
npm install fails with ERESOLVE unable to resolve dependency tree (peer dependency conflict)
#36npm error code ERESOLVE npm error ERESOLVE unable to resolve dependency tree npm error Could not resolve dependency: peer react@"^18.3.1" from react-dom@18.3.1
PowerShell: running scripts is disabled on this system (npm, npx, venv Activate.ps1)
#136File C:\...\npm.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies. (also Activate.ps1 for Python venv)
windowspowershellnpmpythonNo reports yet