Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gulp failed with AssertionError #34

Open
ericluwj opened this issue May 13, 2018 · 8 comments
Open

Gulp failed with AssertionError #34

ericluwj opened this issue May 13, 2018 · 8 comments
Labels
question Further information is requested

Comments

@ericluwj
Copy link

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.
@yupnano yupnano added the question Further information is requested label May 18, 2018
@sunnypandas
Copy link

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

@ericluwj
Copy link
Author

Try ./node_modules/.bin/gulp instead.

@sunnypandas
Copy link

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

@mohindergupta
Copy link

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.

@ivanlopezmolina
Copy link

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!

@alediez2048
Copy link

Thank you so much man, this solved my issue

@Sarah86
Copy link

Sarah86 commented Aug 15, 2019

yaaayyy!!! it had to be exactly this steps

@aastharawat
Copy link

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')).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

8 participants