← All errors · Vercel

Command "npm run build" exited with 1

Exact error

Error: Command "npm run build" exited with 1

What it means

Your build script failed on Vercel. This line is a summary; the real error is earlier in the build log.

Likely causes

How to fix it

  1. Scroll up in the Vercel build log to the first red error; that is the real cause.

  2. Reproduce locally with a clean install:

    rm -rf node_modules .next
    npm ci
    npm run build
  3. Fix type/lint errors shown. As a temporary escape hatch only, Next.js lets you skip them:

    // next.config.js
    module.exports = {
      eslint: { ignoreDuringBuilds: true },
      typescript: { ignoreBuildErrors: true },
    };
  4. Make sure all build-time env vars are set in Vercel project settings.

Related errors

Get new fixes weekly

No spam. Unsubscribe anytime. Privacy