Node: npm 命令出错 Error: EEXIST: file already exists, mkdir 'C:\Program Files\nodejs\npm' at Error (native) 3.10.3

Created on 21 Sep 2016  ·  10Comments  ·  Source: nodejs/node

npm 命令出错 Error: EEXIST: file already exists, mkdir 'C:\Program Files\nodejs\npm'
at Error (native)

在win7下安装node.js和npm,从node.js官网上下载的pkg安装的。

安装后,只有 npm -v的命令可以正常显示版本号,其它npm命令都后报这个错

Error: EEXIST: file already exists, mkdir 'C:\Program Files\nodejs\npm'
at Error (native)
3.10.3

我已经卸载又重装了node.js好几次,还是不行。npm就是出错。

有遇到类似情形的吗?怎么解决的。

npm

Most helpful comment

@347830076 进入C:\Program Files\nodejs\的文件夹。如果你卸载了,这个文件夹不应该还存在。有可能是卸载了时候没删干净,所以在安装时候出问题。

你可以试一下,先卸载,然后把C:\Program Files\nodejs\删了在安装。有效果在这儿回复。

中文写的不好不好意思了...

All 10 comments

请用英文描述遇到的问题吧。(大牛才能看明白)。

You should describe your problem in English, please.

你有进入安装后的文件夹看看吗

进入安装后的文件夹?进入哪个文件夹?看什么?

@fundon It’s not a requirement to post in English here, even though that’s helpful.

@347830076 进入C:\Program Files\nodejs\的文件夹。如果你卸载了,这个文件夹不应该还存在。有可能是卸载了时候没删干净,所以在安装时候出问题。

你可以试一下,先卸载,然后把C:\Program Files\nodejs\删了在安装。有效果在这儿回复。

中文写的不好不好意思了...

Rough translation of the issue is that when @347830076 installs he gets the above error saying unable to mkdir etc. Uninstall and reinstall didn't help.

Suggested fix is to uninstall node, manually remove that directory, and try reinstalling.

I assume @347830076 no longer has this issue since it's been a while, so closing. If you have any more questions, please file a new issue.

@347830076 如果你还有其它问题,请再开一个新的 issue。谢谢!

@gibfahn 中文写的很好了,厉害,可以了,解决了

@gibfahn 中文很好!

@gibfahn 牛逼

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mcollina picture mcollina  ·  3Comments

Icemic picture Icemic  ·  3Comments

seishun picture seishun  ·  3Comments

willnwhite picture willnwhite  ·  3Comments

stevenvachon picture stevenvachon  ·  3Comments