Earlier quoted context omitted.
Why rely on nvm to pin the NodeJS version you are using? That's natively supported as a field in your package.json [0], assumimg you're using npm/yarn/pnpm (you are). Example: { "engines": { "node": ">=0.10.3 Also, god forbid you are actually running anything using Node 8 and whatever dependencies you have there, that's a recipe for security disaster. The truth is that to use the NodeJS ecosystem we must have the dis…
Mostly because you want your project to just work. You've tested your project with a certain version of Node, and you want to ensure that you use the same exact version when you come back to the project in a year and want to perform some minor updates. You can set the node constraint in package.json, but that doesn't install the correct version of Node for you, unlike nvm.
edit: someone here in this thread suggested Volta [0] which seems literally like what I was looking for. No need for the nvmrc as it simply follows what's in the engine property of the package.json. Even better is that it's not a weird massive shell script but instead an actual program written in Rust. I'll have to try it out sometime.
[0]: https://volta.sh/