无法在windows8上启动npm(错误:ENOENT, stat 'C:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

时间:2022-06-01 02:27:43

This question already has an answer here:

这个问题已经有了答案:

I just installed Nodejs on my new computer with Windows 8. I can't get npm to work on it. Although the node server starts fine:

我刚在我的新电脑上安装了Nodejs。我不能让npm去做这件事。尽管节点服务器启动良好:

Here's the error:

这是一个错误:

C:\Users\User\Documents\Source\Project>npm install 
Error: ENOENT, stat 'C:\Users\User\AppData\Roaming\npm'


C:\Users\User\Documents\Source\Project>npm start
Error: ENOENT, stat 'C:\Users\User\AppData\Roaming\npm'


C:\Users\User\Documents\Source\Project>

2 个解决方案

#1


12  

Latest version is not compatible with windows 8. Just download this files and it works in my windows 8 perfectly. http://blog.nodejs.org/2014/06/16/node-v0-10-29-stable/

最新版本与windows 8不兼容。只要下载这个文件,它就能在我的windows 8中完美运行。http://blog.nodejs.org/2014/06/16/node-v0-10-29-stable/

#2


85  

you can try to create 'C:\Users\User\AppData\Roaming\npm' folder.

你可以尝试创建“C:\用户\ \ \ \ \ \ \ \ \ \ \ \ \npm”文件夹。

#1


12  

Latest version is not compatible with windows 8. Just download this files and it works in my windows 8 perfectly. http://blog.nodejs.org/2014/06/16/node-v0-10-29-stable/

最新版本与windows 8不兼容。只要下载这个文件,它就能在我的windows 8中完美运行。http://blog.nodejs.org/2014/06/16/node-v0-10-29-stable/

#2


85  

you can try to create 'C:\Users\User\AppData\Roaming\npm' folder.

你可以尝试创建“C:\用户\ \ \ \ \ \ \ \ \ \ \ \ \npm”文件夹。