n: Installed on Ubuntu 16.04.2 LTS, and `n ` doesn't change which node version I am using.
Issue Template:
Describe issue including what OS you are using
Ubuntu 16.04.2 LTS
Describe what version of N you have
2.1.7
Describe how you installed N
npm i -g n while on node v4.2.6 which is installed with default apt-get registry for my version of Ubuntu.
Steps to reproduce issue 1.2.3
npm i -g n
n latest
node -v
Describe the results you received
It outputs v4.2.6, but I was expecting v8.1.4
What version of npm you are using
5.0.3
Additional information you deem important (e.g. issue happens only occasionally):
> which n
/usr/local/bin/n
> node -v
v4.2.6
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 14
- Comments: 19
I seem to run into the same issue where
nlinks the new version to/usr/local/bin/nodejswhereas my install has Node running from/usr/local/bin/node.I’ve installed Node using the following:
For now fixing this using:
Once linked, changing the version using
nwill automatically maintain the symlink correctly.May actually be a duplicate of https://github.com/tj/n/issues/381 I’ve found that indeed after restarting the shell it did find the correct Node version.
Restarting shell didn’t work for me. It turned out that something (I’m guessing heroku toolbelt?) had added a new binary for me.
Removing that worked.
It might help to remove the pre-installed version of node
sudo apt remove nodejsexport PATH=$PATH:/usr/local/bin/node
Restarting the shell was the most common fix.
This issue has not had any activity in over six months. It isn’t likely to get acted on due to this report.
Feel free to open a new issue if it comes up again, with new information and renewed interest.
Thank you for your contributions.
I had something similar:
So I needed to rehash (or quit and re-run the shell) to fix this.
This was from doing the git clone version of install and then the foregoing n-based installs, all in one shell. Hard to think how to fix this, except perhaps by making ‘n’ check whether ‘which node’ changes value and printing a ***** BIG OBVIOUS WARNING ***** about it for stupid people like me. 😃
Here’s hoping I won’t suffer the npm install Buffer.alloc bug now.