'Deprecated packages while installing gulp with npm

System: Pop!_OS 21.04

The problem: Deprecated packages while installing gulp with npm

npm install --global gulp-cli error

npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: 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 [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: 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.

I have already tried:

  • npm cache clear --force
  • npm install
  • npm install -g npm
  • sudo apt-get auto-remove && apt-get clean && apt-get update && apt-get upgrade*

USEFUL LOGS

$ npm fund

fabianofrank
├─┬ https://opencollective.com/bootstrap
│ │ └── [email protected]
│ └── https://opencollective.com/popperjs
│     └── @popperjs/[email protected]
└── https://github.com/sponsors/jonschlinkert
    └── [email protected]

$ npm list

fabianofrank@ /home/fabianofrank
├── [email protected]
└── [email protected]

$ npm list -g

/home/fabianofrank/.npm-global/lib
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

$ gulp --version

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' ]
}


Solution 1:[1]

Gulp hasn't been updated in almost 3 years, so most likely has a number of outdated & deprecated packages. If these errors annoy you, are a deal-breaker, or you don't want to see security vulnerabilities, then the best thing to do is not use Gulp & find a replacement. I'm going through the same process here at the moment too. :(

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 rob