NPM:ENOENT:没有那个文件或目录,重命名 [英] NPM: ENOENT: no such file or directory, rename

查看:43
本文介绍了NPM:ENOENT:没有那个文件或目录,重命名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在项目上使用了 gulp,然后我决定删除所有开发依赖项以切换到 webpack,但是每次我尝试使用 npm 安装时都会出现此错误:

I was using gulp on the project, then i decide to deleted all the dev dependencies to switch to webpack, but every time i try to install using npm is get this error:

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

知道会发生什么.

推荐答案

我找到了问题的解决方案,显然是最新版本的 npm 有点问题,我使用的是 npm 版本 5.6.0 并且我降级到 npm version 5.3.0.毕竟这确实有效,在安装了几个软件包后,我仍然遇到相同的错误.

I found a solution for the problem, apparently is some kinda problem with the last version of npm, i was using npm version 5.6.0 and i downgraded to npm version 5.3.0. This did work after all, after intall a couple packages i still get the same error.

确定更改最后一个 version 5.8.0 的 npm 版本现在一切正常,之前是 atom 的某种问题,拒绝了构建过程安装包依赖项的权限.

ok change version of npm for the last version 5.8.0 now everything working just perfect, before was some kind of problem with atom that denied the permission the building process to install the dependencies of the package.

这篇关于NPM:ENOENT:没有那个文件或目录,重命名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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