Gulp 4.0:AssertionError [ERR_ASSERTION]:任务未定义:build-externs

时间:2018-07-25 16:20:18

标签: gulp

我在以下功能块中遇到此错误

function repeatTaskForAllLocales(taskName, dependencies, operation) {
  const tasks = [];
  ALL_LOCALES.forEach((locale) => {
    // Convert build-js-$ to build-js-fr, for example.
    const replaceTokens = (name) => name.replace(/\$/g, locale);

    const localeTaskName = replaceTokens(taskName);
    tasks.push(localeTaskName);
    const localeDependencies = dependencies.map(replaceTokens);
    // old version : gulp.task(localeTaskName, localeDependencies, () => operation(locale));  updated to following line
    gulp.task(localeTaskName, gulp.series(localeDependencies, () => operation(locale))) . // <--- gulpfile.babel.js:177:36
  });
  return tasks;
}

wgat可能与gulp.series()错误。 ?

0 个答案:

没有答案