Npm Is Not Recognized By Visual Studio

Introduction

Recently, I was facing issues in Visual Studio 2015, when I tried to install “bower”, using Node Package Manager.

“The term 'npm' is not recognized as the name of a cmdlet, function, script file or operable program. Check the spelling of the name or if a path was included, verify that the path is correct and try again”.


These issues cannot be installed from the Package Manager console, so I had to browse lot of things to fix the issues and finally I got the solution.

Maybe we followed these scenarios

  • Missing Node.js software
  • Wrongly updated Windows environment path
  • Installed in the wrong path
  • Old version of Node.js software

You can download the latest Node.js software here.

Download the latest version of node-v6.9.4.msi file from the Browser.



Click to installation file, setup wizard will install the path “C:\Program Files (x86)” or “C:\Program Files “ and click next which will exhibit the Custom Setup screen to enable all the features.


Click Next and the setup is almost compete. Click Finish button.

Update Path

After installation, automatically create nodejs folder in this path “C:\Program Files (x86)” or “C:\Program Files “.

Open Control Panel -> User Accounts -> Change my environmental variable and verify the path Variable value “C:\Program Files (x86)\nodejs” or “C:\Program Files \nodejs “.


If the path is wrong, you can edit to change the Windows directive. 

Summary

Once you close and open Visual Studio, go to tools->NuGet Package Manager -> Package Manager console.


Type “npm” and enter command should execute successfully and find the solution for “The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again”.

Ebook Download
View all
Learn
View all