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

I am completely new to nodejs and have been trying to get nodejs to work on my Windows 2008 box in order to install Karma which I would use for TDDing my AngularJs code. I have done the following steps so far

  1. Install using Chocolatey ==> npm is not recognised

  2. Install using 64-bit nodejs installer from nodejs.org ==> npm is not recognised

  3. At this stage, running where npm gives me c:\User\<Username>\AppData\Roaming\npm which has nothing in it

  4. I figured out that node js is installed in C:\Program Files\nodejs. Opening a command prompt in this directory makes npm work fine.

  5. So I added C:\Program Files\nodejs to PATH only to get the same error again that npm is not recognized

  6. One of the github issues on nodejs repository says that I need to restart the machine and fix it. But that has not helped so far

  7. I do see a Node.js icon in my Start -> Programms menu which takes me to node js console but I'm not sure what to do with that.

Have I missed any important step in the process? I figured out that if I open "Node Js command prompt" from program files, then npm is recognized. How do I make it work on a normal command prompt?

Node is not recognized as an internal or external command, operable program or batch file.
Feb 10 in Others by
• 8,740 points
3,425 views

1 answer to this question.

To your existing lines of code, include this additional line:-

;C:\Program Files\nodejs\

This will enable you to end your Path variable on the "User variable" section of the Environment Variables on the System Properties. Once concluded, reopen your command prompt and type
 

npm

Which should help the program work.

Node is not recognized as an internal or external command, operable program or batch file.
answered Feb 10 by Rahul
• 9,000 points

  • All categories
  • Node is not recognized as an internal or external command, operable program or batch file.
    Apache Kafka (84)
  • Node is not recognized as an internal or external command, operable program or batch file.
    Apache Spark (596)
  • Node is not recognized as an internal or external command, operable program or batch file.
    Azure (131)
  • Node is not recognized as an internal or external command, operable program or batch file.
    Big Data Hadoop (1,907)
  • Node is not recognized as an internal or external command, operable program or batch file.
    Blockchain (1,673)
  • Node is not recognized as an internal or external command, operable program or batch file.
    C# (122)
  • Node is not recognized as an internal or external command, operable program or batch file.
    C++ (228)
  • Node is not recognized as an internal or external command, operable program or batch file.
    Career Counselling (1,060)
  • Node is not recognized as an internal or external command, operable program or batch file.
    Cloud Computing (3,356)
  • Node is not recognized as an internal or external command, operable program or batch file.
    Cyber Security & Ethical Hacking (145)
  • Node is not recognized as an internal or external command, operable program or batch file.
    Data Analytics (1,266)
  • Node is not recognized as an internal or external command, operable program or batch file.
    Database (525)
  • Node is not recognized as an internal or external command, operable program or batch file.
    Data Science (73)
  • Node is not recognized as an internal or external command, operable program or batch file.
    DevOps & Agile (3,500)
  • Node is not recognized as an internal or external command, operable program or batch file.
    Digital Marketing (111)
  • Node is not recognized as an internal or external command, operable program or batch file.
    Events & Trending Topics (28)
  • Node is not recognized as an internal or external command, operable program or batch file.
    IoT (Internet of Things) (387)
  • Node is not recognized as an internal or external command, operable program or batch file.
    Java (1,122)
  • Node is not recognized as an internal or external command, operable program or batch file.
    Kotlin (3)
  • Node is not recognized as an internal or external command, operable program or batch file.
    Linux Administration (384)
  • Node is not recognized as an internal or external command, operable program or batch file.
    Machine Learning (337)
  • Node is not recognized as an internal or external command, operable program or batch file.
    MicroStrategy (6)
  • Node is not recognized as an internal or external command, operable program or batch file.
    PMP (423)
  • Node is not recognized as an internal or external command, operable program or batch file.
    Power BI (516)
  • Node is not recognized as an internal or external command, operable program or batch file.
    Python (3,137)
  • Node is not recognized as an internal or external command, operable program or batch file.
    RPA (650)
  • Node is not recognized as an internal or external command, operable program or batch file.
    SalesForce (92)
  • Node is not recognized as an internal or external command, operable program or batch file.
    Selenium (1,569)
  • Node is not recognized as an internal or external command, operable program or batch file.
    Software Testing (56)
  • Node is not recognized as an internal or external command, operable program or batch file.
    Tableau (608)
  • Node is not recognized as an internal or external command, operable program or batch file.
    Talend (73)
  • Node is not recognized as an internal or external command, operable program or batch file.
    TypeSript (123)
  • Node is not recognized as an internal or external command, operable program or batch file.
    Web Development (2,747)
  • Node is not recognized as an internal or external command, operable program or batch file.
    Ask us Anything! (66)
  • Node is not recognized as an internal or external command, operable program or batch file.
    Others (899)

Subscribe to our Newsletter, and get personalized recommendations.

Already have an account? Sign in.

How do you fix node is not recognized as an internal or external command?

Click on the edit system environment variables, a window will open where you have to click on Environment Variables. The Environment Variables window will open where you have to select or double click on the variable Path. Now paste the complete path where Node. js was installed.

Why node is not working in cmd?

Make sure the node path is added, if not added it. After doing this restart Visual Studio or open a fresh command prompt. From the command prompt type 'node -v' to echo the node version installed. You can also add the path to node or any other application directly on the command line.

Why is node not recognized in Visual Studio code?

1 Answer. Show activity on this post. You must click the Kill Terminal button (highlighted) and then restart VS Code and node will start working again. Best on making a change of system environment variable Path is restarting Windows to make sure that really all processes make use of the modified Path variable.

How do you resolve is not recognized as an internal or external command operable program or batch file?

You can resolve this issue in three ways:.
First, use the full path of the executable file to launch the program..
Second, add the program path to Windows environment variables..
Finally, move the files to the System32 folder..