【发布时间】:2018-09-14 00:40:35
【问题描述】:
我在项目中使用 gulp,然后我决定删除所有开发依赖项以切换到 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
知道会发生什么。
【问题讨论】:
-
尝试在 Dropbox 中的文件夹中安装 Express 时遇到了与此非常相似的情况。因此,我将其安装到 Dropbox 外部的临时文件夹中,并将其复制进去,这解决了我的问题。很烦人。
-
@kebman : 在尝试了一些建议之后,你拯救了我的一天:dropbox,,,,
标签: npm npm-install npm-scripts