npm Error: EPERM: operation not permitted, mkdir 'C:\Program Files (x86)\nodejs' at Error (native)

时间:2016-06-10 16:11:14

标签: node.js npm

I have recently installed nodejs (version 6.2.1) and nodejs tools for visual studio (version 1.1.1) on my laptop. I have cloned one of my projects from GitHub, when I try to update my npm dependencies (i.e. Express, Bower) I get this error

Error: EPERM: operation not permitted, mkdir 'C:\Program Files (x86)\nodejs'
              at Error (native)

My default nodejs install is at C:\Program Files\nodejs.

I have also tried to run the command npm update using admin permission in cmd, all this does is create the folder but the command seems to never finish.

Thanks in advance if anyone can help

1 个答案:

答案 0 :(得分:3)

它发生了同样的错误,但另一种情况。你只需要打开Node.js命令提示符作为Administratior。我希望这可以帮助你。