我正在跟着这个视频,gulp的代码正在视频中工作,但是我遇到了问题:
当我运行 'autoload' =>
array (
'psr-4' =>
array (
'Vendor\\Extensionkey\\' => 'Classes',
),
),
'_md5_values_when_last_written' => 'a:0:{}',
'suggests' => array(
),
并将gulp设置为默认值时,但这是日志:
/...
b00.setOnLongClickListener(this)
b01.setOnLongClickListener(this)
b02.setOnLongClickListener(this)
}
//...
override fun onLongClick(v: View?): Boolean {
var id = v?.id
if ((id == b00.id) or (id == b01.id) or (id == b02.id)) {
//your code
return true
}
return false
}
package.json:
gulp
代码:
npm WARN npm npm does not support Node.js v10.15.2
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
npm ERR! missing script: default
npm ERR! A complete log of this run can be found in:
npm ERR! /home/me/.npm/_logs/2019-12-29T00_42_33_080Z-debug.log
me@vlife:gulf$ npm run gulp
npm WARN npm npm does not support Node.js v10.15.2
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
> gulp-project@1.0.0 gulp /home/me/codedir/gulf
> gulp default
assert.js:350
throw err;
^
AssertionError [ERR_ASSERTION]: Task function must be specified
at Gulp.set [as _setTask] (/home/me/codedir/gulf/node_modules/undertaker/lib/set-task.js:10:3)
at Gulp.task (/home/me/codedir/gulf/node_modules/undertaker/lib/task.js:13:8)
at Object.<anonymous> (/home/me/codedir/gulf/gulpfile.js:23:6)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! gulp-project@1.0.0 gulp: `gulp default`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the gulp-project@1.0.0 gulp 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! /home/me/.npm/_logs/2019-12-29T00_42_44_118Z-debug.log
答案 0 :(得分:0)
我也解决了这个问题,甚至已经解决了
gulp.task('default', ['run', 'watch']);
gulp.parallel()
gulp.task('default', gulp.parallel('run', 'watch') );