Node version is being ignored

Hello Cloudflare Community,

I am new to Cloudflare Pages and everything worked as expected so far. Today, I added a wrangler.toml file to configure my local Wrangler workspace, but since I created the file, my NODE_VERSION environment variable is being ignored so I cannot deploy my page, because one of my dependencies require Node.js v20.

My wrangler.toml:

#:schema node_modules/wrangler/config-schema.json
name = '<my project name>'
pages_build_output_dir = '.svelte-kit/cloudflare'

[[d1_databases]]
binding = 'database'
database_name = '<my db name>'
database_id = '<my db id>'

My build log also says the following: Detected the following tools from environment: [email protected], [email protected]

Maybe Iā€™m not the only one who ran into this issue and someone already has a solution for this - it would be really nice!

I fixed it by adding a .nvmrc file with the following contents:

20
1 Like

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