‘npm’ is not recognized as the name of a cmdlet

In this Azure article, we will discuss the quick steps to fix the error “‘npm’ is not recognized as the name of a cmdlet” I got while installing the Azure Function Core Tools.

‘npm’ is not recognized as the name of a cmdlet

Recently, I was trying to install Azure Function Core Tools in my newly installed Visual Studio Code, and I was trying to execute the below command in the VS code terminal.

npm install -g azure-functions-core-tools@3 --force

The moment I started executing, I got this error. Below is the complete error message.


npm : 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.
At line:1 char:1
+ npm install -g azure-functions-core-tools@3 --force
+ ~~~
    + CategoryInfo          : ObjectNotFound: (npm:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

You can see the same error in the below screenshot.

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

‘npm’ is not recognized as the name of a cmdlet [Solved]

To solve this error, you need to install Node.Js. Since I have newly installed the Visual Studio IDE, I just missed installing it.

Just follow the below steps.

  1. You can download the Node.js setup file based on your operating system.
  2. Double-click on the file to start to install.
install Node.Js Windows

3. Click on the Next button.

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

4. accept the License agreement and click on the Next button, choose the installation path on the next popup, and then click the next button on the further pop-ups.

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

5. Finally, click the Install and Yes buttons on the next pop-up to start the installation process.

npm is not recognized

After the installation of the Node.js, I was able to run the same command successfully.

You can see the below screenshot for your reference.

'npm' is not recognized

‘npm’ is not recognized as the name of a cmdlet – Video Tutorial

You may also like following the below articles.

Wrapping Up

In this Azure article, we learned the quick steps to fix the error “‘npm’ is not recognized as the name of a cmdlet“. Thanks for reading this article !!!