Pages build failed Cloudflare Origin: Edge & web server OSI layer 7 · Application Last updated 2 Dec 2026

Cloudflare Pages: Build failed — Node.js version not supported / npm ERR! (build command exited with code 1)

The Pages build environment could not build the project.

Exact message you may see Cloudflare Pages build failedBuild failed Node.js versionFailed: build command exited with code: 1pages build error
Seen on: Cloudflare Pages

Meaning

Pages uses a fixed default Node version and package manager. A framework needing newer Node, a missing lockfile, or env variables set only locally make builds fail even when they work locally.

Common causes

  • Node version too old for the framework
  • Environment variables missing in Pages settings
  • Wrong build command or output directory
  • Lockfile mismatch (npm vs pnpm vs yarn)

⚡ Quick fix

  1. Set NODE_VERSION (and PNPM_VERSION) as environment variables
  2. Add production env vars in the dashboard
  3. Match the build command and output directory to the framework

Detailed fix by platform

Pages settings

  1. Environment variables → NODE_VERSION = 20; Build command npm run build; Output dist

How to diagnose

  1. Log — First error line?
  2. Node — Version?
  3. Env — Variables set?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Edge & web server. Errors that are often confused with or caused by this one (click to open):

1000 — Cloudflare Error 1000: DNS points to prohibited IP (Cloudflare)100010000 — wrangler / Cloudflare API: Authentication error [code: 10000] (Cloudflare)100001001 — Cloudflare Error 1001: DNS resolution error (Cloudflare)1001ERR_OSSL_EVP_UNSUPPORTED — Error: error:0308010C:digital envelope routines::unsupported (Node.js)ERR_OSSL_EVP_UNSUPPOR…node-sass — Error: Node Sass does not yet support your current environment (Node.js)node-sassOutput directory not found — Cloudflare Pages build: Error: Output directory "dist" not found / Failed: build output directory not found (Cloudflare)Output directory not …prisma generate — Error: @prisma/client did not initialize yet. Please run "prisma generate" (Node.js)prisma generatePages bui…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.