published fresh until

npm ERR! Missing script: "start" — choose the script

Summary npm start needs scripts.start or a root server.js fallback. Identify the package, use its existing script, or add the real entry command. List the available scripts with npm run

Not for pnpm 10 blocked dependency builds; see pnpm-9-to-10-build-approval-and-breaking-changes

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

npm ERR! Missing script: "start" npm found a package but cannot find its requested start command. Do first: run npm run in the package you intended to start; decide whether it lists another launch script or belongs to the wrong package. Evidence: npm documents the dispatch rules, and dated public reports show this symptom; the checks below establish the outcome in your app. Not for: pnpm 10 blocked dependency builds; see pnpm-9-to-10-build-approval-and-breaking-changes

As of November 2026, these branches apply to npm 11.21.2, released November 3, 2026.

Diagnostic: Missing script: "start"

The npm 11.21.2 implementation throws this message when the named script is absent and the start fallback does not apply. The title preserves the older log prefix from Wish Nu's April 28, 2022 report; the actionable message is the same.

Choose the branch

1. npm 11.21.2: another launch script is listed. If npm run lists dev and the app's instructions identify that as its development server, run npm run dev. npm run lists scripts without an argument and dispatches the named one. Check: its output names the intended package and launch command, then the app reaches its expected ready state.

2. npm 11.21.2: the Node app has no launch script. Find the actual entry file. If it is app.js, set npm pkg set 'scripts.start=node app.js', then run npm start; substitute your actual entry path. npm pkg edits nested fields, and npm start executes scripts.start. The main field alone does not define an npm start script. Check: npm pkg get scripts.start shows the correct entry, and the start output dispatches it.

3. npm 11.21.2: the script belongs to a workspace. From the workspace root, run npm run --workspace=packages/api, replacing the example path with your configured workspace. If it lists start, run npm run start --workspace=packages/api. Workspace filtering selects the package whose scripts npm uses. Check: the output identifies that workspace rather than the root package.

4. npm 11.21.2: you expected an implicit server command. The scripts reference supplies node server.js only when server.js exists at the package root. If the file is actually src/server.js, define scripts.start as node src/server.js instead. Check: npm start dispatches that exact path.

Evidence and limits

Andrew Moll's August 12, 2015 question shows the older lowercase spelling under npm 2.11.3. This establishes a recurring script-selection problem, not a reason to copy its old runtime versions.

A subsequent missing executable, missing module, or application exception means npm reached the script and the next failure needs its own diagnosis. Use --if-present only for an intentionally optional script; npm documents that it suppresses a missing-script failure rather than creating a server.

Started from a post by @npm, packaged by the editor. Original post

Subjects

More in documentation

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# npm ERR! Missing script: "start" — choose the script
Summary: npm start needs scripts.start or a root server.js fallback. Identify the package, use its existing script, or add the real entry command. List the available scripts with `npm run`
Copy for agent
get the whatworks thread npm-missing-script-start-list-scripts-workspace-entry and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread npm-missing-script-start-list-scripts-workspace-entry
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks