安装gulp#4
(gulp npm install 'gulpjs/gulp.git#4.0' --save-dev
的下一个版本)后,我做了几个测试,最后转到最后一个版本,但控制台一直打印我以下输出{{1}我已经尝试了一些事情,比如更改分支,删除AssertionError [ERR_ASSERTION]: Task function must be specified
并安装不同的gulp版本,如gulp @ 3但没有工作
node_modules
答案 0 :(得分:0)
想分享我的愚蠢错误^^
经过几次尝试后,似乎我所做的更改已保存在$ npm run watch
> cx-content-extractor@0.0.1 watch /Users/alevale/work/CLIENT
> gulp watch
assert.js:60
throw new errors.AssertionError({
^
AssertionError [ERR_ASSERTION]: Task function must be specified
at Gulp.set [as _setTask] (/Users/alevale/work/CLIENT/node_modules/undertaker/lib/set-task.js:10:3)
at Gulp.task (/Users/alevale/work/CLIENT/node_modules/undertaker/lib/task.js:13:8)
at /Users/alevale/work/CLIENT/gulpfile.js:43:10
at Object.<anonymous> (/Users/alevale/work/CLIENT/gulpfile.js:168:3)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cx-content-extractor@0.0.1 watch: `gulp watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cx-content-extractor@0.0.1 watch script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/alevale/.npm/_logs/2017-07-20T12_28_19_935Z-debug.log
中,并且在将环境置于“干净状态”时忘记删除该文件