Cloudflare ignores NODE_VERSION
Next.JS 15 requires nodejs version 18.18.0, but Cloudflare's is 18.17.1
When I change
NODE_VERSION
env variable, it just does not change it.17 Replies
it's picking it up from a file
check you don't have an nvmrc, it configured in package.json or a .node-version file
Do I have to create .nvmrc?
And what should I set contents of it to?
How can I create nvmrc
i mean i'm saying you may have one of those files
not make one
I dont
it's picking it up from some file
what's your package.json?
Is this the reason maybe?
hmm no
well, you can add engines yourself, i think package.json is the highest presidence
"engines": {
"node": "20.18.0"
}
I added
I'm waiting
Nope
@Walshy | Out of office Sorry for the ping, any ideas?
I'm bumping this
I'm bumping
It takes those info from package-lock.json in your case from pnpm-lock.yaml I guess where there's mentioning of engines and node version requirements for each packages
I cannot post post but how do i fix error 1068?? on the services srry i cannot post sorry
I need help
I too tried deploying my sveltekit app today and faced similar problem. I tried mentioning engines in package.json file and a also tried mentioning in .node-version file.
but this seem to work for me so far.
https://developers.cloudflare.com/pages/configuration/build-image/#overriding-default-versions
(2. Add the environment variable on the dashboard by going to Settings > Environmnet variables in your Pages project, or add the environment variable via Wrangler.)
however the npm version is still default old one(I thought it would be corresponding based on the mentioned node version, that's whats mentioned in docs )