I had installed node js 0.12 for getting the harmony features. But now on my project development, I am using nvm so that I can have multiple node versions. I have made default version as 0.10.34. And so whenever I type this command:
node --version
I am getting version as 0.10.34. This is fine.
But on installing some of the packages like node-inspector, the following warning is coming and my debugger is not working properly on installing.
engine xmlbuilder@2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"0.12.3","npm":"2.9.1"})
the debugger gives error like:
Error: Cannot find module '/usr/lib/node_modules/node-inspector/node_modules/v8-debug/build/debug/v0.4.4/node-v11-linux-x64/debug.node'
Runtime.getProperties failed.
ReferenceError: frame_index is not defined
According to npm installer, the version is still 0.12. I have searched a lot to remove this version but cannot find any working solution.
Execute
sudo apt-get remove nodejs
to uninstall the 0.12.x version of nodejs. If your experience is like mine on Ubuntu 14.04,that also uninstalled npm.
The script that you got using curl added the file /etc/apt/sources.list.d/nodesource.list
Remove that file
sudo rm /etc/apt/sources.list.d/nodesource.list
Then execute
sudo apt-get install nodejs
It will install node 0.10.x.
You will also need to re-create the soft link if you plan to type
node
from the command line.
ln -s /usr/bin/nodejs /usr/bin/node
Finally, re-install npm
sudo apt-get install npm