# `npm error Missing script: "build" — Error: Command "npm run build" exited with 1`

**Where it appears:** Vercel build logs

**What it means:** Vercel tried to build your site, but the repo's root folder doesn't have a Next.js `package.json` with a `build` script.

## Likely causes

- The repo was imported into Vercel before the Next.js app skeleton was pushed.
- `create-next-app` was created inside a subfolder instead of moving its files to the project root.

## Message for your agent

```text
Vercel says `Missing script: "build"`. Check that `package.json` with the Next.js scripts is at the root of the repo, commit and push.
```

**Prevention:** Keep `package.json` at the root of your project folder (`Development/<project-name>/package.json`).

---
Source: [Agentic Makers](https://agenticmakers.app/en/help/errors/npm-error-missing-script-build) · License: CC BY 4.0
