Reputation: 4407
On ubuntu 16.04, I upgraded node.js to version 10.16.0. The new version is installed and working; however, typing 'node' on the shell command line looks in the wrong place:
# node -v
bash: /usr/local/bin/node: No such file or directory
The newly installed version is in /usr/bin:
# which node
/usr/bin/node
# /usr/bin/node -v
v10.16.0
# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
Where is the 'node' command being defined? Why is it not using $PATH to find the new version at /usr/bin?
Upvotes: 1
Views: 472
Reputation: 4407
oops, my bad. I was still running the same shell. When I closed it out and logged back in, the path was set correctly.
Upvotes: 1