Gulp - issue with 'Task function must be specified'

0 votes
610 views
added Jul 11, 2019 in Gulp by LC Marshal Captain (25,790 points)

Example of error as shown below:

$ gulp
assert.js:43
  throw new errors.AssertionError(obj);
  ^

AssertionError [ERR_ASSERTION]: Task function must be specified

 

Commonly it related to gulp version 4.0. 2 options avaiable to fix it:

  1. Downgrade your gulp version
    1. Edit your package.json with:
      "gulp": "^3.9.1",
      
    2. Remove your node_modules folder
      rm -rf node_modules
      
    3. And reinstall it by 
      npm i
      
  2. Or, update your working code to 4.0

 

 

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...