Use .nvmrc #4142
bitdivine
started this conversation in
Feature Requests
Use .nvmrc
#4142
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Motivation
Each of our ICP projects specifies a specific node version. This is important to get reliable results and reproducible builds. But when switching between projects it is necessary to remember to switch node version for native (non-dockerized) builds. This is an unnecessary risk.
The situation with Rust is better; if there is a
rust-toolchain.tomlfile, the rust version in that file is used automatically (when runningdfx buildand similar commands).It would be nice if front-end canister builds did the same.
Proposed solution
.nvmrcfile,dfx buildof a front-end canister could use it. For example, this uses the node version in the.nvmrc:.node-versionfile, do something similar. I find this situation a bit ambiguous though. The.node-versionfile is used by many tools. Maybe someone actively does NOT want to usenvm. By the existence of a.node-versionfile we cannot determine the user's preferred node versioning tool. Maybe it would be best to do nothing in this case. A user can always opt in by soft-linking.nvmrcto the.node-versionfile.npmdirectly.Beta Was this translation helpful? Give feedback.
All reactions