[英]grunt task undefined not found
我對Grunt相當陌生,並嘗試使用grunt-protractor-coverage
插件運行自定義任務,但出現錯誤
警告:找不到任務“未定義”。 使用--force繼續。
我的腳本如下。
module.exports = function(grunt) {
grunt.registerTask('test', 'Log some stuff.', function() {
console.log('Logging some stuff...');
});
grunt.initConfig({
instrument: {
files: 'server/**/*.js',
options: {
lazy: true,
basePath: "instrumented"
}
}
});
grunt.loadNpmTasks('grunt-protractor-coverage');
grunt.registerTask('instrument');
// Default task(s)
grunt.registerTask('default', ['instrument']);
};
我以前有這個問題,可以通過更新咕gr聲解決。 將是嘗試的良好第一步:
npm --global update grunt-cli
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.