You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sourcing nvm.sh fails if a readonly environment variable VERSION (or some other readonly variables that nvm.sh uses) are defined. IMO nvm should use variables with a unique prefix even for local variables, in this case e.g. NVM_VERSION.
I agree, having a readonly variable in an interactive terminal is rare.
Things might be different when it comes to automation: We have a build script for our CI that has to source nvm.sh as part of the build but also sets the readonly VERSION variable.
IMO since NVM is implemented using shell functions it should not interfere (or at least as little as possible) with the normal use of the shell.
Sourcing
nvm.sh
fails if a readonly environment variableVERSION
(or some other readonly variables that nvm.sh uses) are defined. IMO nvm should use variables with a unique prefix even for local variables, in this case e.g.NVM_VERSION
.Operating system and version:
Ubuntu 24.04.2 LTS
nvm debug
output:nvm ls
output:How did you install
nvm
?Script in readme
What steps did you perform?
What happened?
Sourcing
nvm.sh
failed:What did you expect to happen?
Sourcing
nvm.sh
succeeds without error.The text was updated successfully, but these errors were encountered: