I am having an issue with nvm in the terminal. When I try to run npm install <something>
, it always installs the package in node version 9.4.0, regardless of the version set using nvm.
Even after switching to node version 10.15.3 using nvm use v10.15.3
, global commands like npm install -g ionic@latest
still install in the 9.4.0 directory instead of the expected 10.15.3 directory.
My output looks like this...
.../.nvm/versions/node/v9.4.0/bin/ionic -> .../.nvm/versions/node/v9.4.0/lib/node_modules/ionic/bin/ionic
Despite being on version 10.15.3, packages are installing in the 9.4.0 folder.
I'm using nvm version 0.34.0
.
This is my bash_profile setup:
export NVM_DIR=~/.nvm
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
source ~/.nvm/nvm.sh