/usr/local/lib/node_modules/
npm uninstall xxxx
Apparently, there was a “/Users/myusername/local” folder that contained a “include” with “node” and “lib” with “node” and “node_modules”. How and why this was created instead of in my “/usr/local” folder, I do not know.
Deleting these local references fixed the phantom v0.6.1-pre. If anyone has an explanation, I’ll choose that as the correct answer.
EDIT:
To recap, the best way (I’ve found) to completely uninstall node + npm is to do the following:
- go to /usr/local/lib and delete any node and node_modules
- go to /usr/local/include and delete any node and node_modules directory
- if you installed with brew install node, then run brew uninstall node in your terminal
- check your Home directory for any local or lib or include folders, and delete any node ornode_modules from there
- go to /usr/local/bin and delete any node executable
You may need to do the additional instructions as well:
sudo rm /usr/local/bin/npm
sudo rm /usr/local/share/man/man1/node.1
sudo rm /usr/local/lib/dtrace/node.d
sudo rm -rf ~/.npm
sudo rm -rf ~/.node-gyp
sudo rm /opt/local/bin/node
sudo rm /opt/local/include/node
sudo rm -rf /opt/local/lib/node_modules
Then download nvm and follow the instructions to install node. The latest versions of node come with npm, I believe, but you can also reinstall that as well.
as well..
website who has shared this wonderful article at here.