Gulp Gulp 功能无法正常运行

xzv2uavs  于 2022-12-08  发布在  Gulp
关注(0)|答案(1)|浏览(154)

我正在做的教程发现在这里学习Bootstrap 4:https://www.youtube.com/watch?v=hnCmSXCZEpU&t=484s
当运行gulp命令的时候,没有找到gulp命令。在环顾四周后,我发现解决方案是添加gulp CLI包,我这样做了。
现在Gulp命令运行了,但我得到的不是教程中描述的红色屏幕,而是以下错误:

assert.js:373
    throw err;
    ^

AssertionError [ERR_ASSERTION]: Task function must be specified
    at Gulp.set [as _setTask] (C:\Users\alexm\bs4\node_modules\undertaker\lib\set-task.js:10:3)
    at Gulp.task (C:\Users\alexm\bs4\node_modules\undertaker\lib\task.js:13:8)
    at Object.<anonymous> (C:\Users\alexm\bs4\gulpfile.js:21:6)
    at Module._compile (internal/modules/cjs/loader.js:868:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:879:10)
    at Module.load (internal/modules/cjs/loader.js:731:32)
    at Function.Module._load (internal/modules/cjs/loader.js:644:12)
    at Module.require (internal/modules/cjs/loader.js:771:19)
    at require (internal/modules/cjs/helpers.js:68:18)
    at execute (C:\Users\alexm\AppData\Roaming\npm\node_modules\gulp\node_modules\gulp-cli\lib\versioned\^4.0.0\index.js:36:18) {
  generatedMessage: false,
  code: 'ERR_ASSERTION',
  actual: false,
  expected: true,
  operator: '=='
}

相关问题