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.
Table of Contents
‘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 [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.
- You can download the Node.js setup file based on your operating system.
- Double-click on the file to start to install.
3. Click on the Next button.
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.
5. Finally, click the Install and Yes buttons on the next pop-up to start the installation process.
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 as the name of a cmdlet – Video Tutorial
You may also like following the below articles.
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 !!!
I am Rajkishore, and I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machine, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.