首页 > 解决方案 > 如何解决在控制台输入 npm i 时出现的问题。我正在使用 gulp

问题描述

PS C:\Users\user1\Desktop\hello> npm i

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 chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.

npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated phantomjs-prebuilt@2.1.16: this package is now deprecated
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\chokidar\node_modules\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
-
npm ERR! code ENOENT
-
npm ERR! syscall spawn git
-
npm ERR! path git
-
npm ERR! errno ENOENT
-
npm ERR! enoent Error while executing:
-
npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/DABH/diagnostics.git
-
npm ERR! enoent

npm ERR! enoent
-
npm ERR! enoent spawn git ENOENT
-
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\user1\AppData\Roaming\npm-cache\_logs\2020-06-22T15_12_17_615Z-debug.log

标签: npmgulpnpm-install

解决方案


这似乎与最近对包的更改有关。请参阅:https ://github.com/3rd-Eden/diagnostics/issues/22


推荐阅读