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

Solution 1:

Just add:

;C:\Program Files\nodejs\

To the end of your Path variable on the "User variable" section of the Environment Variables on the System Properties.

After that, reopen your command prompt and type

npm

This should work.

Solution 2:

Don't forget to reboot your computer after installing node! That one got me.

Solution 3:

To elaborate on Breno's answer... For Windows 7 these steps worked for me:

  1. Open the Control Panel (Click the Start button, then click Control Panel)
  2. Click User Accounts
  3. Click Change my environment variables
  4. Select PATH and click the Edit... button
  5. At the end of the Variable value, add ;C:\Program Files\nodejs
  6. Click Ok on the "Edit User Variable" window, then click Ok on the "Environment Variables" window
  7. Start a command prompt window (Start button, then type cmd into the search and hit enter)
  8. At the prompt (C:\>) type npm and hit enter; you should now see some help text (Usage: npm <command> etc.) rather than "npm is not recognized..."

Now you can start using npm!

Solution 4:

For Windows users: A picture tells a thousand words enter image description here

Reference: npm not recognized as internal or external command (Note: this is my own blog)