系统:流行!_OS 21.04
问题:使用 npm 安装 gulp 时不推荐使用的软件包
npm install --global gulp-cli 错误
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
added 265 packages, and audited 266 packages in 13s
6 packages are looking for funding
run `npm fund` for details
13 high severity vulnerabilities
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
npm install -g gulp
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 deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
added 348 packages, and audited 349 packages in 15s
7 packages are looking for funding
run `npm fund` for details
21 high severity vulnerabilities
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
我已经尝试过:
- npm 缓存清除 --force
- npm 安装
- npm 安装 -g npm
- sudo apt-get auto-remove && apt-get clean && apt-get update && apt-get upgrade*
有用的日志
$ npm 基金
fabianofrank
├─┬ https://opencollective.com/bootstrap
│ │ └── bootstrap@5.1.3
│ └── https://opencollective.com/popperjs
│ └── @popperjs/core@2.10.2
└── https://github.com/sponsors/jonschlinkert
└── picomatch@2.3.0
$ npm 列表
fabianofrank@ /home/fabianofrank
├── bootstrap@5.1.3
└── chokidar@3.5.2
$ npm 列表 -g
/home/fabianofrank/.npm-global/lib
├── gulp-cli@2.3.0
├── gulp@4.0.2
├── jshint@2.13.1
├── npm@8.1.2
└── sass@1.43.4
$ gulp --版本
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module 'gulp-cli'
Require stack:
- /usr/share/nodejs/gulp/bin/gulp.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/usr/share/nodejs/gulp/bin/gulp.js:3:1)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/usr/share/nodejs/gulp/bin/gulp.js' ]
}