nvm alias default stable doesn't persist 'stable' on new shell

Created on 16 Dec 2016  路  4Comments  路  Source: nvm-sh/nvm

As I understand it, if I want to set a default node version I need to run

$ nvm alias default stable

Contents of $nvm ls:

         v4.6.2
         v6.9.1
default -> stable (-> v6.9.1)
node -> stable (-> v6.9.1) (default)
stable -> 6.9 (-> v6.9.1) (default)
iojs -> N/A (default)
lts/* -> lts/boron (-> v6.9.1)
lts/argon -> v4.6.2
lts/boron -> v6.9.1

open new shell

$ nvm current
none
$ nvm debug
nvm --version: v0.32.1
$SHELL: /bin/zsh
$HOME: /Users/reneruiz
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
nvm current: none
which node: node not found
which iojs: iojs not found
which npm: /usr/local/bin/npm
npm config get prefix: env: node: No such file or directory
npm root -g: env: node: No such file or directory

What am I doing wrong?

installing nvm non-issue / invalid zsh

Most helpful comment

Resolved by moving the following from middle to the end of .zshrc

# activate nvm
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"

All 4 comments

Resolved by moving the following from middle to the end of .zshrc

# activate nvm
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"

Sounds like you have something in your .zshrc that's modifying the PATH. Glad you figured it out!

Thanks, @reneruiz. That worked for me as well.

good~

Was this page helpful?
0 / 5 - 0 ratings