npm 错误:EPERM:不允许操作,mkdir 'C:\Program Files (x86)\nodejs' at Error (native) [英] npm Error: EPERM: operation not permitted, mkdir 'C:\Program Files (x86)\nodejs' at Error (native)

查看:309
本文介绍了npm 错误:EPERM:不允许操作,mkdir 'C:\Program Files (x86)\nodejs' at Error (native)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在我的笔记本电脑上安装了 nodejs(版本 6.2.1)和用于 Visual Studio 的 nodejs 工具(版本 1.1.1).我从 GitHub 克隆了我的一个项目,当我尝试更新我的 npm 依赖项(即 Express、Bower)时出现此错误

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)

我的默认 nodejs 安装在 C:\Program Files\nodejs.

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

我还尝试在 cmd 中使用管理员权限运行命令 npm update,所做的只是创建文件夹,但该命令似乎永远不会完成.

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

推荐答案

我遇到了同样的错误,但出现了另一种情况.您只需要以管理员身份打开 Node.js 命令提示符即可.希望对您有所帮助.

It occured to me the same error but another situation.You just need to open the Node.js command prompt as Administratior.I hope this can help you.

这篇关于npm 错误:EPERM:不允许操作,mkdir 'C:\Program Files (x86)\nodejs' at Error (native)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆