The term ‘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 : 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 -v + ~~~ + categoryinfo : objectnotfound: (npm:string) [], commandnotfoundexception + fullyqualifiederrorid : commandnotfoundexception. I got this error while installing the Azure Function Core Tools.

The term ‘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.

node : the term 'node' 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 + node -v + ~~~~ + categoryinfo : objectnotfound: (node:string) [], commandnotfoundexception + fullyqualifiederrorid : commandnotfoundexception

The term ‘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.
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.

3. Click on the Next button.

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.

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 init -y + ~~~ + categoryinfo : objectnotfound: (npm:string) [], commandnotfoundexception + fullyqualifiederrorid : commandnotfoundexception

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

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

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 : 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 + ~~~ + categoryinfo : objectnotfound: (npm:string) [], commandnotfoundexception + fullyqualifiederrorid : commandnotfoundexception

The term npm is not recognized as the name of a cmdlet vscode – 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 : 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. Thanks for reading this article !!!