neb.js icon indicating copy to clipboard operation
neb.js copied to clipboard

Gulp failed with AssertionError

Open ericluwj opened this issue 7 years ago • 8 comments

Using the current package.json dependency setting "gulp": ">=3.9.0",version 4.0.0 of gulp-cli is automatically installed. Setting should be set such that only the version 3 of gulp-cli is installed instead.

Error obtained with gulp v4:

yarn build v0.24.6
$ gulp
assert.js:42
  throw new errors.AssertionError({
  ^

AssertionError [ERR_ASSERTION]: Task function must be specified
    at Gulp.set [as _setTask] (/Users/ericluwj/Projects/neb.js/node_modules/undertaker/lib/set-task.js:10:3)
    at Gulp.task (/Users/ericluwj/Projects/neb.js/node_modules/undertaker/lib/task.js:13:8)
    at Object.<anonymous> (/Users/ericluwj/Projects/neb.js/gulpfile.js:71:6)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at execute (/Users/ericluwj/Projects/neb.js/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js:36:18)
    at Liftoff.handleArguments (/Users/ericluwj/Projects/neb.js/node_modules/gulp-cli/index.js:175:63)
    at Liftoff.execute (/Users/ericluwj/Projects/neb.js/node_modules/liftoff/index.js:203:12)
    at module.exports (/Users/ericluwj/Projects/neb.js/node_modules/flagged-respawn/index.js:51:3)
    at Liftoff.<anonymous> (/Users/ericluwj/Projects/neb.js/node_modules/liftoff/index.js:195:5)
    at /Users/ericluwj/Projects/neb.js/node_modules/liftoff/index.js:165:9
error Command failed with exit code 1.

ericluwj avatar May 13 '18 07:05 ericluwj

Hi, I have this problem, too. Do you resolved it? Thanks. @ericluwj

sunnypandas avatar May 26 '18 14:05 sunnypandas

Try ./node_modules/.bin/gulp instead.

ericluwj avatar May 26 '18 14:05 ericluwj

Maybe we should use gulp V3 instead of V4. Thank you. @ericluwj

sunnypandas avatar May 27 '18 07:05 sunnypandas

I had the same problem and resolved it as follows As per the instructions in readme doc, ran the command "npm install gulp -g" as mentioned in step 2 when i was trying to host marbles locally. This gave me the same error as discussed above.

  1. To fix it, I removed the gulp completely from global and local directory by using the commands below. Ran both these commands to make sure gulp is removed locally and globally. npm rm gulp -g --save npm rm gulp --save (probably this is not needed, but i did it)

  2. Installed gulp using following npm install [email protected] -g --save npm install [email protected] --save (probably this is not needed, but i did it)

After step 3, make sure you have both CLI and Local version as 3.9.1. If Local version is higher, then also I had the problem. I hope this helps.

mohindergupta avatar Nov 24 '18 02:11 mohindergupta

I had the same problem and resolved it as follows As per the instructions in readme doc, ran the command "npm install gulp -g" as mentioned in step 2 when i was trying to host marbles locally. This gave me the same error as discussed above.

  1. To fix it, I removed the gulp completely from global and local directory by using the commands below. Ran both these commands to make sure gulp is removed locally and globally. npm rm gulp -g --save npm rm gulp --save (probably this is not needed, but i did it)
  2. Installed gulp using following npm install [email protected] -g --save npm install [email protected] --save (probably this is not needed, but i did it)

After step 3, make sure you have both CLI and Local version as 3.9.1. If Local version is higher, then also I had the problem. I hope this helps.

yes last both installation are needed, thank you!

ivanlopezmolina avatar Apr 08 '19 19:04 ivanlopezmolina

Thank you so much man, this solved my issue

alediez2048 avatar Aug 12 '19 14:08 alediez2048

yaaayyy!!! it had to be exactly this steps

Sarah86 avatar Aug 15 '19 09:08 Sarah86

v3 is deprecated. Here you are using the latest version but older code. With v4, replace gulp.watch('./sass/.sass', ['sass']) with gulp.watch('./sass/.sass', gulp.series('sass')).

aastharawat avatar Jul 28 '20 13:07 aastharawat