gulp-cli fails if local gulp is 4.0
See original GitHub issueWithin my project’s package.json
I have:
json
"dependencies": {
"gulp": "git+https://github.com/gulpjs/gulp.git#4.0"
}
If I globally install stable gulp
(3.X) and run gulp
it fails (known issue, ok). But if I globally install gulp-cli
it also fails:
bash
$ gulp
[15:59:34] Using gulpfile ~/src/XXX/gulpfile.js
/Users/xxxxxx/.npm-packages/lib/node_modules/gulp-cli/index.js:133
gulpInst.start.apply(gulpInst, toRun);
^
TypeError: Cannot call method 'apply' of undefined
at /Users/xxxxxx/.npm-packages/lib/node_modules/gulp-cli/index.js:133:20
at process._tickDomainCallback (node.js:463:13)
at Function.Module.runMain (module.js:499:11)
at startup (node.js:119:16)
at node.js:906:3
I fail to understand the purpose of gulp-cli
if it fails in this scenario. Do I miss something?
Issue Analytics
- State:
- Created 9 years ago
- Reactions:1
- Comments:11 (3 by maintainers)
Top Results From Across the Web
gulp command not found - error after installing gulp
If you get gulp local version not found exit the current Node.js command prompt and try the above command in a new Node.js...
Read more >How to fix "Local gulp not found" error message
When trying to run Gulp on the command line, are you getting an error saying Local gulp not found ? Even if you...
Read more >Mea culpa - always install gulp-cli globally, not gulp
This is a story about a mea culpa. You should install the gulp-cli package globally, not gulp globally. To better understand why, ...
Read more >command not found: gulp - theUnknown - Medium
Tried to install gulp-cli globally and failed with the following error: ... gulp -v[19:43:16] CLI version 3.9.1[19:43:16] Local version 4.0.0.
Read more >Quick Start | gulp.js
If you've previously installed gulp globally, run npm rm --global gulp before following these ... Output: CLI version 2.0.1 & Local version 4.0.0 ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@xzegga yep I resolved it , it’s working.
Bring back your CLI version to 1.2.2 it will support gulp 4, and will solve your problem.
to install gulp-cli 1.2.2 run
sudo npm install gulp-cli@1.2.2 -g
and to install gulp local runnpm install 'gulpjs/gulp.git#4.0' --save-dev
when you run
gulp -v
commandyou should get [11:38:36] CLI version 1.2.2 [11:38:36] Local version 4.0.0-alpha.2
I confirm that the solution proposed by @rajathms works !
I did :
sudo npm install gulp-cli@1.2.2 -g