npm ENOENT错误

时间:2018-04-07 22:00:42

标签: node.js windows npm

我正在尝试使用npm安装一些东西,但每次出现ENOENT错误。在做npm install gulp时,我得到了:

C:\Users\coope\TextGame>npm install gulp
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace 
it, following the guidelines at https://medium.com/gulpjs/gulp-util-
ca3b1f9f9ac5

npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 
for compatibility with current and future versions of Node.js

npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 
or higher to avoid a RegExp DoS issue

npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 
or higher to avoid a RegExp DoS issue

npm WARN deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 
for compatibility with current and future versions of Node.js

npm WARN deprecated natives@1.1.3: This module relies on Node.js's 
internals and will break at some point. Do not use it, and update to 
graceful-fs@4.x.

npm WARN textgame@1.0.0 No description
npm ERR! path C:\Users\coope\TextGame\node_modules\ansi-styles
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 
'C:\Users\coope\TextGame\node_modules\ansi-styles' -> 
'C:\Users\coope\TextGame\node_modules\.ansi-styles.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\coope\AppData\Roaming\npm-cache\_logs\2018-04- 
07T21_48_09_076Z-debug.log

对于像express这样的其他模块,除了字节模块外,我得到类似的错误。

我试图用npm安装这些丢失的模块,但是npm无法安装任何东西。手动安装模块有效,但有太多的依赖关系是合理的。如何解决这个问题?

0 个答案:

没有答案