Node.js version mismatch for Next.js build&deploy from git
20:48:47.062 | ▲ 147 packages are looking for funding-- | --20:48:47.062 | ▲ run `npm fund` for details20:48:47.072 | ▲ Detected Next.js version: 15.1.720:48:47.077 | ▲ Running "npm run build"20:48:47.421 | ▲ > kick-yoon-static@0.1.0 build20:48:47.422 | ▲ > next build20:48:47.559 | ▲ 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.20:48:47.577 | ▲ Error: Command "npm run build" exited with 120:48:47.742 | 20:48:47.742 | ⚡️ The Vercel build (`npx vercel build`) command failed. For more details see the Vercel logs above.20:48:47.742 | ⚡️ If you need help solving the issue, refer to the Vercel or Next.js documentation or their repositories.20:48:47.743 | 20:48:47.785 | Failed: Error while executing user command. Exited with error code: 120:48:47.793 | Failed: build command exited with code: 120:48:48.881 | Failed: error occurred while running build command
20:48:47.062 | ▲ 147 packages are looking for funding-- | --20:48:47.062 | ▲ run `npm fund` for details20:48:47.072 | ▲ Detected Next.js version: 15.1.720:48:47.077 | ▲ Running "npm run build"20:48:47.421 | ▲ > kick-yoon-static@0.1.0 build20:48:47.422 | ▲ > next build20:48:47.559 | ▲ 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.20:48:47.577 | ▲ Error: Command "npm run build" exited with 120:48:47.742 | 20:48:47.742 | ⚡️ The Vercel build (`npx vercel build`) command failed. For more details see the Vercel logs above.20:48:47.742 | ⚡️ If you need help solving the issue, refer to the Vercel or Next.js documentation or their repositories.20:48:47.743 | 20:48:47.785 | Failed: Error while executing user command. Exited with error code: 120:48:47.793 | Failed: build command exited with code: 120:48:48.881 | Failed: error occurred while running build command
Due to the version mismatch, we could not deploy the application with cloudflare.
I have made a project on MacOS, uploaded(pushed) to git, and tried to build&deploy on CloudFlare without any environment setting changes.