- 操作系统:Windows 10。
- npm 版本:6.9.0
- 节点版本:12.4.0
我正在处理一个博览会应用程序。我想在我的 expo 应用程序 (npm install) 上安装所有包。但是,发生错误:
17254 error [OperationalError: EPERM: operation not permitted, unlink ...
我在很多主题上都看到过这个错误,但没有人回答我的问题。
我已经尝试过:
- 以管理员身份启动我的终端。
- npm 配置设置 safe-perm=true。
- npm 安装 –no-bin-links
- npm 缓存清除 –force
我有一个错误消息的例子:
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 ] ```
原文由 Thomsath 发布,翻译遵循 CC BY-SA 4.0 许可协议
是否有另一个正在运行的节点实例,它也在使用 ReactFabric-dev.js?如果是这样,终止并重试。还尝试将您的项目移动到“更接近”根目录的文件夹中。 Windows 有时会与很长的路径混淆。