首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >国家预防机制错误!错误: EPERM:不允许操作,断开链接

国家预防机制错误!错误: EPERM:不允许操作,断开链接
EN

Stack Overflow用户
提问于 2019-06-21 08:54:09
回答 5查看 34.5K关注 0票数 2
  • 操作系统: Windows 10。
  • npm版本: 6.9.0
  • 节点版本: 12.4.0

我在做一个世博会申请。我想安装在我的博览会应用程序(npm安装)上的所有软件包。但是,出现了一个错误:

17254 error [OperationalError: EPERM: operation not permitted, unlink ...我在很多问题上都看到过这个错误,但是没有人回答我的问题。

我已经试过:

  1. 以管理员身份启动我的终端。
  2. npm配置集安全-perm=true。
  3. npm安装-无装箱链接
  4. npm缓存清晰-强制

我有一个错误消息的例子:

代码语言:javascript
运行
复制
17254 error   cause: [Error: EPERM: operation not permitted, unlink 'C:\Users\Thomas\Desktop\someDirectory\someDirectory\someDirectory\someDirectory\node_modules\.staging\react-native-99ed309f\Libraries\Renderer\oss\ReactFabric-dev.js'] {
17254 error     errno: -4048,
17254 error     code: 'EPERM',
17254 error     syscall: 'unlink',
17254 error     path: 'C:\\Users\\Thomas\\Desktop\\someDirectory\\someDirectory\\someDirectory\\someDirectory\\node_modules\\.staging\\react-native-99ed309f\\Libraries\\Renderer\\oss\\ReactFabric-dev.js'
17254 error   },
17254 error   stack: 'Error: EPERM: operation not permitted, unlink ' +
17254 error     "'C:\\Users\\Thomas\\Desktop\\someDirectory\\someDirectory\\someDirectory\\someDirectory\\node_modules\\.staging\\react-native-99ed309f\\Libraries\\Renderer\\oss\\ReactFabric-dev.js'",
17254 error   errno: -4048,
17254 error   code: 'EPERM',
17254 error   syscall: 'unlink',
17254 error   path: 'C:\\Users\\Thomas\\Desktop\\someDirectory\\someDirectory\\someDirectory\\someDirectory\\node_modules\\.staging\\react-native-99ed309f\\Libraries\\Renderer\\oss\\ReactFabric-dev.js'
17254 error }
17255 error The operation was rejected by your operating system.
17255 error It's possible that the file was already in use (by a text editor or antivirus),
17255 error or that you lack permissions to access it.
17255 error
17255 error If you believe this might be a permissions issue, please double-check the
17255 error permissions of the file and its containing directories, or try running
17255 error the command again as root/Administrator (though this is not recommended).
17256 verbose exit [ -4048, true ] ```
EN

Stack Overflow用户

发布于 2019-06-21 23:06:06

通过登录npmjs:npm login来解决它

卸载所有npm模块并使用npm install --no-bin-links重新安装

代码语言:javascript
运行
复制
rd /s /q C:\Users\foo\AppData\Roaming\npm-cache
rd /s /q C:\Users\foo\AppData\Roaming\npm
票数 3
EN
查看全部 5 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56700018

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档