Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'npm' is not recognized as an internal or external command error in Developer Command Prompt for VS2015

I am trying to execute npm install –g tsd in Developer Command Prompt for VS2015.

But it returns

'npm' is not recognized as an internal or external command, operable program or batch file.

Any idea?

like image 415
s.k.paul Avatar asked Nov 04 '15 06:11

s.k.paul


People also ask

What is NPM is not recognized error?

But sometimes, you may encounter the npm is not recognized error as shown below: > npm --version 'npm' is not recognized as an internal or external command, operable program or batch file. The error above happens when the Windows operating system doesn’t know what to do with the npm command.

Is NPM An internal or external command?

'npm' is not recognized as an internal or external command, operable program or batch file. Follow the steps below for Windows users: Click Advanced System Setting from the Left bar of a window.

How to fix'NPM is not recognized as an internal command?

If the package is successfully installed and still shows the message " 'npm' is not recognized as an internal or external command, operable program or batch file. " Click windows start button. Look for " ALL APPS ", you will see Node.js and Node.js Command prompt there.

How to resolve ‘node’ is not recognized as an internal error?

How to resolve ‘node’ is not recognized as an internal or external command error after installing Node.js ? There are many different ways to install node.js on a computer. The simplest method to verify whether node.js has been properly installed in your computer is simply type node-v in the command prompt or Windows PowerShell.


3 Answers

To solve this issue in Visual Studio 2017 (and above), make sure to install the NodeJS tools in the VS installer.

To launch it, go to Control Panel -> Programs -> Programs and Features, scroll down to Visual Studio 2017 and click Change.

Choose Modify in the installer.

Check the Node.js development checkbox and click Modify to complete the installation.

enter image description here

like image 192
silkfire Avatar answered Oct 07 '22 15:10

silkfire


Download / Install NodeJS tools for Visual Studio; that'll fix the issue and give you intellisense among other benefits!

https://github.com/Microsoft/nodejstools

like image 26
Allan Elder Avatar answered Oct 07 '22 16:10

Allan Elder


This solution is specifically for Visual studio code editor. The easiest way to solve that, is to install plugin for node.js using VS code editor, To do that follow the steps.

click on Extension Icon, and type in search box node.js, It will give you search result. Look for the node.js Extension pack. enter image description here

It should look like the bellow screen, I have already install, the extension. That is why, the green install button is not visible, Just hit on install, once finished. Restart the VS code. now it should work for sure.
enter image description here

like image 2
Varun Avatar answered Oct 07 '22 16:10

Varun