[Request] Upgrade NodeJS version to v14 or v16 for Cloudflare Pages deployment

Hi, I attempted to deploy a NuxtJS v3 app via Cloudflare pages.

This is my build settings :

Framework preset : None
Build command : yarn build
Build output directory : .output

I did not set the Framework preset to NuxtJS since I do not have nuxt generate command in package.json.

Also, this is my app’s package.json :

{
  "private": true,
  "scripts": {
    "dev": "nuxi dev",
    "dev:host": "nuxt dev -h '0' -p 4000",
    "build": "nuxi build",
    "start": "node .output/server/index.mjs",
    "sass": "sass ./assets/scss/styles.scss ./assets/css/main.css -w"
  },
  "devDependencies": {
    "nuxt3": "latest"
  },
 ...
}

However, when building the app, it says error [email protected]: The engine "node" is incompatible with this module. Expected version "^14.16.0 || ^16.11.0 || ^17.0.0". Got "12.18.0".

I guess the NodeJS version is still v12.18.0. It would be great if you can upgrade NodeJS version to v16 (LTS) to avoid an error like this.

Thanks.

1 Like

Having the same issue

Same issue aswell. Any progress on it?

Same issue. I’m using nextjs and the framework itself even require a version >=12.22.0. 12.18.0 is far too old…

Have you tried working with NODE_VERSION variable to change it to 14/16? https://developers.cloudflare.com/pages/platform/build-configuration

I recall being able to do that but not sure.

Also see: https://developers.cloudflare.com/pages/platform/known-issues

1 Like

Hey,

As mentioned above you can indeed specify the NODE_VERSION environment variable to change this!

Example (make sure to set for production and previews):
image

Image updates will come in the future where the default version will be different. There is no ETA for this however.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.