n: Cannot switch node versions?
$> node -v
v5.7.1
$> sudo n latest
install : node-v6.8.0
mkdir : /usr/local/n/versions/node/6.8.0
fetch : https://nodejs.org/dist/v6.8.0/node-v6.8.0-linux-x64.tar.gz
######################################################################## 100,0%
installed : v6.8.0
$> node -v
v5.7.1
$> n
ο node/6.8.0
$> node -v
v5.7.1
What do I do wrong? How can I switch to node v6 ?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 28
- Comments: 21
I’m having the same issue on Ubuntu 16.04. PS. fixed: closing and reopening the shell I’ve found the new node version.
My issue was I already had node installed via brew. Removing that helped
brew remove nodeIn my case … somehow there was nvm installed as well. removing nvm (
rm -rf ~/.nvm) fixed itAdding
sudoworks for me. (on ubuntu 16.04)sudo n 10.4.0etc.This was also my issue after updating to M1 and macOS Monterrey. Apparently
nstill uses/usr/local/bin/nodein my case, not/opt/homebrew/bin/node. So I justbrew remove node && brew reinstall n && n 12andnode --versionoutput:Same - opening a new shell fixed this issue. Running Ubuntu Mate 16.04 on Raspberry Pi 3.
I’m using an ARM-based system, and which is solved after ssh reconnecting.