Mig*_*ias 9 npm npm-install npm-scripts
我在项目上使用gulp,然后我决定删除所有dev依赖项以切换到webpack,但每次我尝试使用npm安装时都会收到此错误:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Error: EPERM: operation not permitted, rename 'C:\Users\MiguelFrias\Desktop\Therabytes\node_modules\.staging\fsevents-e80c4ef4\node_modules\are-we-there-yet' -> 'C:\Users\MiguelFrias\Desktop\Therabytes\node_modules\.staging\are-we-there-yet-5db4c798'
npm ERR! path C:\Users\MiguelFrias\Desktop\Therabytes\node_modules\acorn
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\MiguelFrias\Desktop\Therabytes\node_modules\acorn' -> 'C:\Users\MiguelFrias\Desktop\Therabytes\node_modules\.acorn.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\MiguelFrias\AppData\Roaming\npm-cache\_logs\2018-04-04T11_54_23_587Z-debug.log
Run Code Online (Sandbox Code Playgroud)
任何想法可以发生什么.
Dam*_*amo 22
当我收到此错误时,我在任务管理器中查找所有正在运行的节点实例(我在 Windows 上使用进程资源管理器)并关闭/杀死所有正在运行的节点实例。对我来说,它通常是 webstorm 或 vs 代码。关闭这些程序并确保没有正在运行的节点进程 npm install 再次工作。
xar*_*rgr 21
只需删除 package-lock.json文件,然后安装包你想要的所有工作
rm package-lock.json && npm i
Run Code Online (Sandbox Code Playgroud)
对我来说最简单的解决方法是:
npm uninstall -g
Run Code Online (Sandbox Code Playgroud)
然后:
npm install -g
Run Code Online (Sandbox Code Playgroud)
我找到了问题的解决方案,显然是 npm 的最后一个版本有点问题,我正在使用npm version 5.6.0
并且降级到npm version 5.3.0
. 毕竟这确实有效,在安装了几个软件包后我仍然遇到相同的错误。
好的,最后更改了 npm 的版本,现在version 5.8.0
一切都工作得非常完美,之前有一些atom的问题拒绝了构建过程安装包依赖项的权限。
归档时间: |
|
查看次数: |
10293 次 |
最近记录: |