Error when use git deploy nextjs 15 cloudflare page
Nodejs need ^18.18.0 ^19.8.0 >= 20.0.0
13:20:36.362 ▲ > next build
13:20:36.523 ▲ You are using Node.js 18.17.1. For Next.js, Node.js version "^18.18.0 ^19.8.0 >= 20.0.0" is required.
13:20:36.532 ▲ ELIFECYCLE Command failed with exit code 1.
13:20:36.567 ▲ Error: Command "pnpm run build" exited with 1
13:20:36.706
13:20:36.706 ⚡️ The Vercel build (
13:20:36.727 Failed: Error while executing user command. Exited with error code: 1 13:20:36.738 Failed: build command exited with code: 1 13:20:37.454 Failed: error occurred while running build
13:20:36.706 ⚡️ The Vercel build (
npx vercel build
) command failed. For more details see the Vercel logs above.
13:20:36.707 ⚡️ If you need help solving the issue, refer to the Vercel or Next.js documentation or their repositories.
13:20:36.70713:20:36.727 Failed: Error while executing user command. Exited with error code: 1 13:20:36.738 Failed: build command exited with code: 1 13:20:37.454 Failed: error occurred while running build
2 Replies
is it a ssr or static pages?
or add NODE=20 in the env like other variabel
@Jerry Fan is your issue fixed ? i'm also getting same error
@Moe Number One🌨 tried this but did not work
@Jerry Fan i find the solution just create .node-version file in root and mention the nodejs version and deploy it will work