Answer the question
In order to leave comments, you need to log in
Why are Gulp tasks not loading?
I decided the other day to rewrite the config for Gall. And everything broke.
In short: taxis are in /tasks, the gulpfile.babel.js file works through Babel.
Galp gulp build
gives an error on startup:
AssertionError [ERR_ASSERTION]: Task never defined: clean
at getFunction (/Users/vovaspace/dev/rr-project/node_modules/undertaker/lib/helpers/normalizeArgs.js:15:5)
at map (/Users/vovaspace/dev/rr-project/node_modules/arr-map/index.js:20:14)
at normalizeArgs (/Users/vovaspace/dev/rr-project/node_modules/undertaker/lib/helpers/normalizeArgs.js:22:10)
at Gulp.series (/Users/vovaspace/dev/rr-project/node_modules/undertaker/lib/series.js:13:14)
at Object.<anonymous> (/Users/vovaspace/dev/rr-project/tasks/build.js:3:25)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at loader (/Users/vovaspace/dev/rr-project/node_modules/babel-register/lib/node.js:144:5)
at Object.require.extensions.(anonymous function) [as .js] (/Users/vovaspace/dev/rr-project/node_modules/babel-register/lib/node.js:154:7)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
const requireDir = require('require-dir');
requireDir('tasks');
import gulp from 'gulp';
gulp.task('build', gulp.series(
'clean',
'styles',
'templates',
'scripts'
));
Answer the question
In order to leave comments, you need to log in
Could it be a problem with the order of the files in the folder?
Solved the issue like this:
import './tasks/clean';
import './tasks/fonts';
import './tasks/images';
import './tasks/scripts';
import './tasks/server';
import './tasks/sprites';
import './tasks/styles';
import './tasks/templates';
import './tasks/watch';
import './tasks/build';
import './tasks/deploy';
import './tasks/default';
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question