错误!代码 EPERM [英] Npm ERR! code EPERM

查看:172
本文介绍了错误!代码 EPERM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 node v6.11.2、npm v5.3.0 和 angular/cli v1.2.7.

I'm using node v6.11.2, npm v5.3.0 and angular/cli v1.2.7.

我的大部分 npm 安装突然收到以下错误消息.以前没见过...

I'm suddenly receiving the following error message for a majority of my npm installs. Never seen it before...

mmeppiel@MC-LT-MMEPPIEL MINGW64 ~/Desktop/Angular Solutions/my-app (master)
$ npm install --save bootstrap@4.0.0-alpha.6 font-awesome
npm ERR! path C:\Users\mmeppiel\Desktop\Angular Solutions\my-app\node_modules\fs                            events\node_modules
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall lstat
npm ERR! Error: EPERM: operation not permitted, lstat 'C:\Users\mmeppiel\Desktop                            \Angular Solutions\my-app\node_modules\fsevents\node_modules'
npm ERR!     at Error (native)
npm ERR!  { Error: EPERM: operation not permitted, lstat 'C:\Users\mmeppiel\Desk                            top\Angular Solutions\my-app\node_modules\fsevents\node_modules'
npm ERR!     at Error (native)
npm ERR!   stack: 'Error: EPERM: operation not permitted, lstat \'C:\\Users\\mme                            ppiel\\Desktop\\Angular Solutions\\my-app\\node_modules\\fsevents\\node_modules\                            '\n    at Error (native)',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'lstat',
npm ERR!   path: 'C:\\Users\\mmeppiel\\Desktop\\Angular Solutions\\my-app\\node_                            modules\\fsevents\\node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\mmeppiel\AppData\Roaming\npm-cache\_logs\2017-08-08T00_56_                            59_442Z-debug.log

谁能解释一下这里发生了什么?我尝试过的事情:

Can anyone explain what's going on here? Things I've tried:

  • 以管理员身份运行 Git Bash
  • 关闭我的防火墙和防病毒保护
  • 运行 npm cache clean
  • 手动删除AppData\Roaming\npm-cache的比赛
  • 通过控制面板卸载节点并重新安装
  • 授予每个人对 C:\Program Files\nodejs 的完全权限
  • 重新安装 CLI
  • 重新启动我的电脑(不会受伤吗?)
  • 确保 node_modules 文件夹不是只读的

珍惜你的时间!

推荐答案

您是否使用任何私人或公司注册表.检查您的 .npmrc 文件并确保其可用.

Are you using any private or company registry. check your .npmrc file and make sure its available.

如果您在公司环境中,请确保代理没有问题.

if you are in company environment, make sure proxy is not a problem.

如果生成了 package-lock.json,请检查您的文件夹.你可以删除那个重新安装.

check in your folder if any package-lock.json is generated. you can delete that make re install.

我毫不怀疑,但带有 npm 5.x.x 的节点 6.x.x 可能是一个问题,因为节点 7.x.x 与 5.x.x 兼容.并且通常节点 6.x.x 与 npm 4.x.x 兼容

I have little doubt but node 6.x.x with npm 5.x.x might be a problem as node 7.x.x is compatible arable with 5.x.x. And normally node 6.x.x is compatible with npm 4.x.x

这篇关于错误!代码 EPERM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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