Fixing npm path in Windows 8 and 10

前端 未结 18 1863
孤街浪徒
孤街浪徒 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:40

    You need to Add C:\Program Files\nodejs to your PATH environment variable. To do this follow these steps:

    1. Use the global Search Charm to search "Environment Variables"
    2. Click "Edit system environment variables"
    3. Click "Environment Variables" in the dialog.
    4. In the "System Variables" box, search for Path and edit it to include C:\Program Files\nodejs. Make sure it is separated from any other paths by a ;.

    You will have to restart any currently-opened command prompts before it will take effect.

提交回复
热议问题