# Vercel: Error: Command "npm run build" exited with 1

**Code:** `Vercel: Command "npm run build" exited with 1` · **Category:** Next.js · **Seen on:** Next.js, Node.js

The Vercel build step failed; the real reason is printed in the build log above this line.

## Meaning

Scroll up to the first error: type errors, lint errors, missing env vars at build, module not found (case-sensitivity), Node version differences, or memory limits. Reproduce locally with `vercel build` or `npm run build` using the same Node version (set in Project Settings or `engines`).

## Common causes

- Type/lint errors only enforced in CI
- Missing environment variables
- Case-sensitive import paths (macOS vs Linux)
- Node version mismatch
- Out-of-memory in the build

## Quick fix

1. Read the build log above the error
2. Run `vercel pull && vercel build` locally
3. Match Node version via `engines.node` or Project Settings

## Detailed fix by platform

### Linux

1. `npx vercel pull --yes && npx vercel build`

## How to diagnose

1. **Log** — First error line?
2. **Env** — Present at build?
3. **Node** — Same version?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/nextjs/vercel-build-command-exited-1)
