Support Node 18 in Pages, or allow config

The current version of Node (18) isn’t supported in Cloudflare Pages. While I know that’s on peoples’ request list, it would also be nice to be able to manually configure Cloudflare Pages in the meantime to use 17.

The NODE_VERSION env variable is ignored if a .nvmrc or .node-version file is committed to the project. In my current setup, I have that set to 17, but since locally I develop in 18 I have a file with .node-version in it. I don’t want to simply use 17 because it’s in a monorepo with lots of other stuff, and I need to ensure things work on Node 18. Pages simply deploys the docs, which could be built with an older version.

So it would be nice for the NODE_VERSION env var to take priority over the local file, or something. Because as of now I can’t use Cloudflare Pages without taking the time to backport my projects to a now-deprecated version of Node.

Pages uses nvm so it should follow any priority or inheritance that nvm uses.

Node 18 support is coming in the new build image - you can give feedback or feature requests here:

3 Likes

Awesome! Will try that, thank you! :slightly_smiling_face: