gulpjs / gulp

A toolkit to automate & enhance your workflow

Home Page:https://gulpjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: Cannot find module 'gulp-cli'

benzmuircroft opened this issue · comments

root@benz-iMac:/home/benz/Downloads/bitcore-8.22.2/packages/bitcore-lib# gulp browser
node:internal/modules/cjs/loader:998
  throw err;
  ^

Error: Cannot find module 'gulp-cli'
Require stack:
- /usr/share/nodejs/gulp/bin/gulp.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/usr/share/nodejs/gulp/bin/gulp.js:3:1)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878: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' ]
}

Node.js v18.12.1
root@benz-iMac:/home/benz/Downloads/bitcore-8.22.2/packages/bitcore-lib# npm install glup-cli -g
npm ERR! code EEXIST
npm ERR! path /home/benz/.nvm/versions/node/v18.12.1/bin/gulp
npm ERR! EEXIST: file already exists
npm ERR! File exists: /home/benz/.nvm/versions/node/v18.12.1/bin/gulp
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.

npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-08-31T12_01_22_435Z-debug-0.log
root@benz-iMac:/home/benz/Downloads/bitcore-8.22.2/packages/bitcore-lib# 
root@benz-iMac:/home/benz/Downloads/bitcore-8.22.2/packages/bitcore-lib# 
root@benz-iMac:/home/benz/Downloads/bitcore-8.22.2/packages/bitcore-lib# 
root@benz-iMac:/home/benz/Downloads/bitcore-8.22.2/packages/bitcore-lib# 
root@benz-iMac:/home/benz/Downloads/bitcore-8.22.2/packages/bitcore-lib# npm remove gulp --force
npm WARN using --force Recommended protections disabled.
npm WARN old lockfile 
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile 
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile 
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated mkdirp@0.5.4: 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 debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated source-map-url@0.4.0: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated istanbul@0.4.5: This module is no longer maintained, try this instead:
npm WARN deprecated   npm i nyc
npm WARN deprecated Visit https://istanbul.js.org/integrations for other alternatives.
npm WARN deprecated ini@1.3.5: Please update to ini >=1.3.6 to avoid a prototype pollution issue
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 847 packages, and audited 848 packages in 28s

76 packages are looking for funding
  run `npm fund` for details

29 vulnerabilities (9 moderate, 15 high, 5 critical)

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.
root@benz-iMac:/home/benz/Downloads/bitcore-8.22.2/packages/bitcore-lib# 
root@benz-iMac:/home/benz/Downloads/bitcore-8.22.2/packages/bitcore-lib# 
root@benz-iMac:/home/benz/Downloads/bitcore-8.22.2/packages/bitcore-lib# npm install glup-cli -g
npm ERR! code EEXIST
npm ERR! path /home/benz/.nvm/versions/node/v18.12.1/bin/gulp
npm ERR! EEXIST: file already exists
npm ERR! File exists: /home/benz/.nvm/versions/node/v18.12.1/bin/gulp
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.

npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-08-31T12_02_48_485Z-debug-0.log
root@benz-iMac:/home/benz/Downloads/bitcore-8.22.2/packages/bitcore-lib# rm -R /home/benz/.nvm/versions/node/v18.12.1/bin/gulp
root@benz-iMac:/home/benz/Downloads/bitcore-8.22.2/packages/bitcore-lib# npm install glup-cli -g
npm WARN deprecated glup-cli@1.0.1: this package has been deprecated

added 20 packages in 1s

2 packages are looking for funding
  run `npm fund` for details
root@benz-iMac:/home/benz/Downloads/bitcore-8.22.2/packages/bitcore-lib# 
root@benz-iMac:/home/benz/Downloads/bitcore-8.22.2/packages/bitcore-lib# 
root@benz-iMac:/home/benz/Downloads/bitcore-8.22.2/packages/bitcore-lib# 
root@benz-iMac:/home/benz/Downloads/bitcore-8.22.2/packages/bitcore-lib# 
root@benz-iMac:/home/benz/Downloads/bitcore-8.22.2/packages/bitcore-lib# gulp browser
node:internal/modules/cjs/loader:998
  throw err;
  ^

Error: Cannot find module 'gulp-cli'
Require stack:
- /usr/share/nodejs/gulp/bin/gulp.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/usr/share/nodejs/gulp/bin/gulp.js:3:1)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878: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' ]
}

Node.js v18.12.1

@benzmuircroft
Since I found the word bitcore-lib in your report, I downloaded it and tried to run the following commands:

$ node -v
v18.12.1
$ git clone https://github.com/bitpay/bitcore.git
$ cd bitcore/packages/bitcore-lib
$ npm install
$ which gulp
gulp not found
$ npx gulp browser
[12:27:37] Using gulpfile /path/to/bitcore/packages/bitcore-lib/gulpfile.js
[12:27:37] Starting 'browser'...
[12:27:37] Starting '<anonymous>'...
[12:27:40] Finished '<anonymous>' after 2.64 s
[12:27:40] Starting '<anonymous>'...
[12:27:45] Finished '<anonymous>' after 4.81 s
[12:27:45] Finished 'browser' after 7.46 s
$ npm install -g gulp-cli
$ which gulp
/path/to/home/.nodebrew/current/bin/gulp
$ gulp browser
[12:30:57] Using gulpfile /path/to/bitcore/packages/bitcore-lib/gulpfile.js
[12:30:57] Starting 'browser'...
[12:30:57] Starting '<anonymous>'...
[12:30:59] Finished '<anonymous>' after 1.91 s
[12:30:59] Starting '<anonymous>'...
[12:31:03] Finished '<anonymous>' after 4.77 s
[12:31:03] Finished 'browser' after 6.68 s$ 

Gulp is seemd to run normally. Please check where gulp and gulp-cli are installed and retry again.

I'll close this issue, but if you find any further problems, please reopen this issue and report them.

@sttk please don't answer issues like this that get raised. Support issues are supposed to be submitted as Discussions and assisted by the community.