node config_error ai_generated true

npm error Missing script: "start"

ID: node/err-missing-script

Also available as: JSON · Markdown
95%Fix Rate
95%Confidence
50Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
20 active

Root Cause

npm run <script> but that script doesn't exist in package.json.

generic

Workarounds

  1. 95% success Add the script to package.json scripts section
    { "scripts": { "start": "node index.js" } }

    Sources: https://docs.npmjs.com/cli/v10/using-npm/scripts

  2. 92% success Check available scripts: npm run (no arguments lists all scripts)
    npm run (no arguments lists all scripts)

    Sources: https://docs.npmjs.com/cli/v10/commands/npm-run-script

  3. 88% success For frameworks, use the right command: next dev, vite, react-scripts start
    next dev, vite, react-scripts start

    Sources: https://docs.npmjs.com/cli/v10/using-npm/scripts

Dead Ends

Common approaches that don't work:

  1. Create a generic start script that might not work 70% fail

    The script should match your actual entry point

  2. Use npx instead of npm run 75% fail

    npx is for running packages, not project scripts

Error Chain

Frequently confused with: