I have two node version installed. One is 8.15.1 and other is 10.15.0. Currently, the active version is 8.15.1 and now I want to switch to 10.15.0. So when I tried changing it, the node version stays the same.
Should change the node version
Not changing node version

$ n --version
6.5.1
$ command -v node
/usr/local/bin/node
$ node -p process.platform
darwin
Mistakenly closed the issue 馃槄Can you please help me out here?
You have got node installed in more than one location, and a version not being managed by n is earlier in the PATH. Your video shows this with path to the freshly "installed" version being different than the "active" version. (The 8.15.1 you see in the n menu is a different copy on disk from the 8.15.1 which is "active", so extra confusing!)
You can confirm the multiple locations (on Mac) and see all the copies in your PATH with:
which -a node
Running n doctor should also detect this setup problem and warn you.
The main two fixes are, either:
1) change your PATH in your shell startup file to put your local bin location before /usr/local/bin. (You said in a deleted message you had done this and it looked like you were on the right track.)
2) or, if you are the only user on the computer, you could delete the copy of node in /usr/local/bin/node and probably the copy of npm from there too
An answer was provided, and no further activity in a month. Closing this as resolved.
Feel free to open a new issue if it comes up again, with new information and renewed interest.
Most helpful comment
You have got node installed in more than one location, and a version not being managed by
nis earlier in thePATH. Your video shows this with path to the freshly "installed" version being different than the "active" version. (The8.15.1you see in thenmenu is a different copy on disk from the8.15.1which is "active", so extra confusing!)You can confirm the multiple locations (on Mac) and see all the copies in your
PATHwith:Running
n doctorshould also detect this setup problem and warn you.The main two fixes are, either:
1) change your
PATHin your shell startup file to put your local bin location before/usr/local/bin. (You said in a deleted message you had done this and it looked like you were on the right track.)2) or, if you are the only user on the computer, you could delete the copy of node in
/usr/local/bin/nodeand probably the copy ofnpmfrom there too