ampproject / amp.dev

The AMP Project Website.
https://amp.dev
Other
583 stars 694 forks source link

Build breaks on "AssertionError: Task function must be specified" #793

Closed ghost closed 6 years ago

ghost commented 6 years ago

Travis build from last night and today for Production and Master breaks with the following error:

assert.js:81
 throw new assert.AssertionError({ ^AssertionError: Task function must be specified
    at Gulp.set [as _setTask] (/home/travis/build/ampproject/docs/node_modules/undertaker/lib/set-task.js:10:3)
    at Gulp.task (/home/travis/build/ampproject/docs/node_modules/undertaker/lib/task.js:13:8)
    at Object.<anonymous> (/home/travis/build/ampproject/docs/gulpfile.js:83:6)

gulp-break

Worked fine for previous night's build. What's different: Last night's build uses gulp@4.0.0.

ghost commented 6 years ago
ghost commented 6 years ago

Closing by using workaround of Gulp 3.9.1.

charlotteyizhang commented 5 years ago

To solve for gulp >4 when you are using gulp.task('default',['task'], function(){}); replace ['task'] with gulp.series('task') or gulp.parallel('task') Hope this can solve your problem :) I found this solution here: https://www.liquidlight.co.uk/blog/how-do-i-update-to-gulp-4/

anjasmaradwisetiadi commented 5 years ago

i have same problem, but i have solved this problem. i suggest you first first make sure npm install your not problem. then you downgrade version node and gulp. i used version node 10.16.1 and gulp 3.9.1. for downgrade your gulp you can write "npm install gulp@^3.9.1"

ezkemboi commented 5 years ago

@charlotteyizhang solved my problem. I think there might not be need of downgrading the version.

kennblvnp commented 5 years ago

@ezrqnkemboi how did u solved it

matthiasrohmer commented 5 years ago

Hi everyone! This issue has been created when this project (formerly ampproject.org) has been updated from Gulp 3 to Gulp 4.

For help on how to upgrade see the various migration guides like this one. If none of them solves your problem, consider asking a new question on StackOverflow tagged with gulp.

The chances to get your problem solved there is a lot higher than in one of thousand issues on GitHub 🙂 Thanks!