Fixing npm path in Windows 8 and 10

前端 未结 18 1610
孤街浪徒
孤街浪徒 2020-11-22 15:30

Have done a lot of googling, tried reinstalling node.js using the official installer, but my npm pathing still doesn\'t work.

This doesn\'t work

npm          


        
18条回答
  •  太阳男子
    2020-11-22 15:35

    I did this in Windows 10,

    1. Search for Environment Variables in the Windows search
    2. "Edit the System environment variables" option will be popped in the result
    3. Open that, select the "Path" and click on edit, then click "New" add your nodeJS Bin path i.e in my machine its installed in c:\programfiles\nodejs\node_modules\npm\bin
    4. Once you added click "Ok" then close

    Now you can write your command in prompt or powershell.

    If you using WIndows 10, go for powershell its a rich UI

提交回复
热议问题