Fix ~ npm is not recognized

 Fix ~ npm not recognized  

 in windows 10 & 11  

Most commonly, it is used to publish, discover, install, and develop node programs.

Excerpted from docs.npmjs.com

<

Download node.js

First Download and install node.js from here Nodejs.org

In windows 10

1. Go to MyComputer propertys

2. Click Advanced system settings

3. Now you are on System Properties window, Click advanced

4. Then, click Environment Variable button

5. From System Variable, Select Path

6. click Edit

7. At the end of the Variable value, add    ;C:\Program Files\nodejs\   

8. Click Ok all the open dialogue box

In windows 11

There are two ways to do this

the short way is,

1. Go to settings

2. Now you are on System window, click About

3. Next, Click on Advanced system settings button

4. Then, Click Environment Variable on the dialogue box

5. From Environment Variable, Select Path

6. And then click Edit

7. click New

8. At the text box, add  ;C:\Program Files\nodejs\ 

9. Click Ok all the open dialogue box

Comments

  1. After making suggested changes still it's giving below error message

    'CALL "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\\node_modules\npm\bin\npm-cli.js" prefix -g' is not recognized as an internal or external command,
    operable program or batch file.
    6.14.16

    ReplyDelete
    Replies
    1. After making changes, restart your computer and try it again or you can run the command prompt as administer and try the code...

      Delete

Post a Comment

Popular Posts