0

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

2
  • try first nvm use your_version Commented Apr 23, 2021 at 19:38
  • Thanks for the reply. I did exactly what you said in your comment and the response is Now using node v11.15.0 (npm v6.7.0). However, when try to install socket.io, npm is still saying or putting out the same error message as before just as it is shown in the image above. Commented Apr 26, 2021 at 14:07

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.