By default Visual Studio 2017 comes with Node 5.4.1 and npm 3.3.4 shipped, and is using them even if you install a new version of Node.js. This happens because Visual Studio has a set of paths that are searched to find node/npm.
If you have a newer versions it might cause problems when restoring packages for example and you may want to tell Visual Studio to use another version.
To check what version of node and npm you have, open Command Prompt (or Windows Powershell) and type
npm --version(or shortly
node --version(or shortly
You should see something like this:
PS C:\Users\scb> npm --version 5.5.1 PS C:\Users\scb> node --version v8.9.1
- Visual Studio : go to Tools -> Options -> Projects and Solutions -> Web Package Management -> External Web Tools
- Modify .\node_modules\.bin to C:\Program Files\nodejs (by default node is installed to this location)
- Restart your Visual Studio for it to take effect