Skip to main content
edited tags
Link
ThN
  • 133
  • 8
Source Link
ThN
  • 133
  • 8

Npm won't install SOCKET.io due to Node version?

I need to install socket.io for my node program. So, whenever I try to install socket.io by running the following commandline instruction, it says node version needs to be greater than or equal to 10 and bunch of other errors, but my node version is 11.

sudo npm install -g socket.io

However, I did notice something strange. Isn't nodejs and node program pretty much the same thing? I supposedly deleted or uninstalled the first installation of node. So, I can upgrade to the latest and the greatest node using Node Version Manager (NVM). So, I did by running the following command, nvm install v11, and it installed successfully. After that, I try to install socket.io thinking current version of Node should allow the installation of socket.io, but nope. It keeps telling me the same thing that node version has to be greater than or equal to 10. So, then I tried to verify node's version. nodejs -v command produced old version number and node -v produced the version 11. I am bit confused. Installation is still looking at the old version of the NODE.

Have a look at the image below.

enter image description here