Update Node.js version on CloudFlare Pages

Published on

Recently I upgraded to 11ty 2.0.

Noticed a failing build on CloudFlare Pages, and found out I was using the default Node.js version, namely v14! 😅

So I updated the package.json to use the latest LTS version of Node.js available on CloudFlare (node 17):

{
  "engines": {
    "node": ">= 16"
  }
}

and in the CloudFlare Pages dashboard, I updated the Node.js version to 16 in the environment variables tab.

Alternatively, with a file called .node-version with the following content:

16.16

Here you can find more information about the Node.js version on CloudFlare Pages.

https://developers.cloudflare.com/pages/platform/build-configuration/#language-support-and-tools

Taking a break
Available for work in 2024