Error when running any of the gulp tasks from gulpfile.babel.js
After updating to Foundation CLI version 2.2.3, I'm now getting errors when attempting to run any of the gulp tasks included in gulpfile.babel.js.
Here's the error:
gulpInst.start.apply(gulpInst, toRun); ^
TypeError: Cannot read property 'apply' of undefined at /Users/NovaDine/.npm-global/lib/node_modules/gulp/bin/gulp.js:129:19 at _combinedTickCallback (internal/process/next_tick.js:73:7) at process._tickCallback (internal/process/next_tick.js:104:9) at Module.runMain (module.js:607:11) at run (bootstrap_node.js:427:7) at startup (bootstrap_node.js:151:9) at bootstrap_node.js:542:3
I'm running Gulp-CLI version 3.9.1, and local Gulp version is 4.0.0-alpha.2.
Running any of the foundation commands (foundation watch, etc.) works as expected.
Any help would be appreciated. Thanks!
hmm it looks like it's using the global gulp rather than the local, and not running it through babel first... given the cli commands are working, this probably has more to do with your node & gulp setup than the cli itself... can you try running either with npm start or explicitly using the local gulp? node_modules/gupl/bin/gulp.js Let me know if those work....
Running both of those commands work, @kball. That means it's an issue with the global gulp setup, right? How I do remedy this? Thanks!
@bpcoxjr It may be an issue in how we have our .bowerrc set up or something similar... I'll need to dig in more, and don't have a ton of time until we get the 6.4 RC packaged up this Thurs... for now lets leave this open with those as the workarounds.
Ok, thank you.
I had the same error on a fresh install of linux. It seems to be an issue that the gulp CLI is out of date, and that version 4 should be installed. Possible duplication of issue https://github.com/gulpjs/gulp-cli/issues/84
gulp is generally run globally from 'usr/local/lib'. So Installing the latest gulp-cli package globally worked for me:
npm install gulpjs/gulp-cli -g
Alternatively, the latest gulp-cli can be installed into the project and loaded into the package.json i.e npm install [email protected] --save-dev
But i think this will only work if using the local version of gulp to run tasks: node_modules/gulp/bin/gulp.js