I am trying to build an application using Node.js
integrated into Visual Studio Code
. The most important versions of the software I have are:
The version of Node.js
I have is v10.15.2
.
The version I have for npm
is 5.8.0
.
I have Ubuntu 19.04
as OS.
It seems that there is a compatibility issue with the old npm
.
So I tried to do the following operations to correctly install the last version of npm
:
1) npm uninstall -g npm
2) sudo npm cache clean -f
3) sudo npm install -g npm
4) npm -v
but it still gives 5.8.0
.
I followed the procedure described here but it doesn't seem to be working.
In addition I found this useful additional post but nothing happened.
If useful I am also posting the output of the debugger in the print-screen below:
Lastly after those steps I receive the following confirmation:
But as soon as I try to check the version npm -v
it still gives 5.8.0
EDITS
The following is the output after a couple of additional trials:
Thank you for pointing in the right direction to solve this matter.
The default version of
npm
for Node 10.15.2 is 6.4.1. Depending on how you installed, the ordering of directories in yourPATH
environment variable will make a difference. To view allnpm
s on yourPATH
, run:Another helpful command is to list out your globally installed packages including where they're installed: