Visual Studio 2015 – How to update NodeJS and/or NPM to their latest version

Visual Studio 2015 - How to update NodeJS and/or NPM to their latest version

Among the things I love the most in Visual Studio 2015 is the seamless integrations of some of the most advanced community-driven, modern development tools such as Node.js, NPM and Bower. Conversely, among the things I love the least there is the fact that, sadly, the designers chose to ship the product with it’s own version of Node.js and NPM providing them in a internal bundle package instead of installing and using them as external executables. This can be a minor nuisance or a major problem, depending how much you’re using these tools and how often you need to keep them up-to-date – which is something that VS2015 doesn’t allow you to do from within the GUI.

Luckily enough, we can easily update them both with a bit of manual work: let’s see how.

Update NPM only

If we only need to update NPM, we can do it in a matter of seconds.

  • Open a Command Prompt with administrative rights.
  • Navigate to the   folder, which is where Visual Studio 2015 keeps the third-party bundles.
  • Once there, execute the following command to see the NPM currently installed version:
  • Right after that, execute the following command to update NPM to the latest available version:  (or   if the former doesn’t work, as explained here).

That’s it.

Update NodeJS and NPM

Unfortunately, we can’t do the same with Node.js because the update via NPM – although supported by all the linux distributions – doesn’t work for the Windows port. If we want to update it too, we need to install the latest version manually using the appropriate   package and then instruct Visual Studio 2015 to use it instead of the bundled one.

Installing Node.js

  • Download the Node.js latest version from the official project page (currently it’s 6.3.1).
  • Install it and take a note of the installation path, such as     (the default one).
  • Once done, open a Command Prompt with administrative priviledges, navigate to the installation folder and update NPM to the latest version by typing   .

Telling VS2015 to use the new version

  • Launch Visual Studio 2015.
  • From the main menu, go to Tools > Options > Projects & Solutions > External Web Tools.
  • Click to the “Add new” icon on the top-right of the screen and add the Node.js installation path, then use the arrow icons to move it to the top of the list.

If you do it correctly you should end with a result similar to the following screenshot:


From now on, Visual Studio 2015 will use the updated versions of Node.js and NPM instead of the bundled ones.

Common issues

If you’re unable to update NPM due to some console errors such as the following one:

npm ERR! enoent ENOENT: no such file or directory

you could try these workarounds:

  • Try to clean the NPM cache using   and try again.
  • Specify the desired version (latest) using the   revised command (thanks to Mark Olbert for sharing this).

That’s it for now: happy coding!



About Ryan

IT Project Manager, Web Interface Architect and Lead Developer for many high-traffic web sites & services hosted in Italy and Europe. Since 2010 it's also a lead designer for many App and games for Android, iOS and Windows Phone mobile devices for a number of italian companies.

View all posts by Ryan