Muflix
Muflix

Reputation: 6778

NPM missing in visual studio 2017

I have Visual Studio 2017 and added support for Node.JS Development and ASP.Net Core. But when I go to Package Manager Console and write

npm

I am getting following error

The term 'npm' is not recognized as the name of a cmdlet

enter image description here

What could be a problem?

NPM should be fully integrated with VS https://webtooling.visualstudio.com/package-managers/npm/

Upvotes: 2

Views: 6055

Answers (1)

Jazimov
Jazimov

Reputation: 13282

The default path for npm is: C:\%ProgramFiles%\nodejs

You should have a npm.cmd there. The Windows PATH environment variable needs to point to that folder.

My advice is to reinstall nodejs from the source: https://nodejs.org/en/download/

During Setup, making sure you choose Custom Setup and select "Add to PATH" and make sure it is set to "Will be installed on local hard drive".

(Of course, shut down all Visual Studio instances before doing the above.)

Upvotes: 1

Related Questions