ignite icon indicating copy to clipboard operation
ignite copied to clipboard

Create .nvmrc to enforce a minimum version of Nodejs for nvm users

Open thehorse2000 opened this issue 1 year ago • 4 comments

I feel like it's important to set a minimum version of nodejs for nvm users at least.Since many devs today use nvm for node version management.

thehorse2000 avatar Oct 12 '24 13:10 thehorse2000

Hey, Thanks for the fast review. I can add the .node-version beside the .nvmrc since nvm doesn't respect the .node-version file. So i think we can keep both maybe? but also another question is what do you think can be the recommended node version should we go with 20.18.0 or a more recent version ?

thehorse2000 avatar Oct 15 '24 08:10 thehorse2000

We already have the "engines" key specified in package.json

Does nvm not respect that? This is what I see with asdf - I set it over what I had locally to induce the failure.

yarn install v1.22.22
warning ../../package.json: No license field
[1/5] 🔍  Validating package.json...
error [email protected]: The engine "node" is incompatible with this module. Expected version "^18.18.0 || >=20.12.0". Got "20.10.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

frankcalise avatar Oct 15 '24 15:10 frankcalise

Yea unfortunately nvm doesn't respect that aswell for some reason. That's why I ran into this issue, I ran the project with node 14 which is what I use for other older projects, and of course it gave many errors. Seems like it might be fine for other managers but nvm only sees .nvmrc, Hence the PR.

thehorse2000 avatar Oct 15 '24 15:10 thehorse2000

@thehorse2000 understood, would you mind trying this solution on chore/node-check-preinstall?

This would hopefully address the issue but not be specific to the tooling involved

Thanks for bringing this to our attention!

frankcalise avatar Oct 15 '24 16:10 frankcalise

:tada: This PR is included in version 10.0.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

infinitered-circleci avatar Nov 27 '24 02:11 infinitered-circleci