nvm
forgets the node version and defaults to nothing:$ nvm ls
:
.nvm v0.11.12 v0.11.13
I have to keep hitting nvm use v.0.11.13
in every session:
.nvm v0.11.12 -> v0.11.13
I've tried both the brew
install, as well as the official installation script.
My .profile
for the brew version:
#nvm export NVM_DIR=~/.nvm source $(brew --prefix nvm)/nvm.sh
And for the install.sh script:
$ curl https://raw.githubusercontent.com/creationix/nvm/v0.10.0/install.sh | bash
#nvm export NVM_DIR="/Users/farhad/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
Just type nvm alias default v10. 16.3 in your terminal and then type nvm use default . This command will make v10. 16.3 available in any shell you open — you just have to restart your terminal to make sure it works.
nvm doesn't handle npm. So if you want to install node 0.4. x (which many packages still depend on) and use NPM, you can still use npm 1.0.
Try nvm alias default
. For example:
$ nvm alias default 0.12.7
This sets the default node version in your shell. Then verify that the change persists by closing the shell window, opening a new one, then: node --version
Alias to node
itself to avoid updating the default alias along with node version updates later on.
nvm alias default node
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With