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

less than 1 minute read

Add the Nodejs path in your environment variables.

  1. Go to Environment variables
  2. Add the below variable under the ‘User variable’,
    Variable = npm
    Value = C:\Program Files\nodejs\
    
  3. Reopen your command prompt or terminal and enter the below command,
    npm
    

    It should work.

Screenshot:

Environment variables - Add npm path

Leave a comment