Installing Node.js (and npm) on Windows 10

2019-01-07 07:24发布

I had some issues trying to install Node on Windows 10 and found the solution.

The error was as follows:

C:\Users\Stephan>npm
Error: ENOENT, stat 'C:\Users\Stephan\AppData\Roaming\npm'

The solution is below.

8条回答
Fickle 薄情
2楼-- · 2019-01-07 08:00

go to http://nodejs.org/

and hit the button that says "Download For ..."

This'll download the .msi (or .pkg for mac) which will do all the installation and paths for you, unlike the selected answer.

查看更多
来,给爷笑一个
3楼-- · 2019-01-07 08:01

You should run the installer as administrator.

  1. Run the command prompt as administrator
  2. cd directory where msi file is present
  3. launch msi file by typing the name in the command prompt
  4. You should be happy to see all node commands work from new command prompt shell
查看更多
登录 后发表回答