Grunt“Watch”不想继续。
问题: 运行“监视”任务 等待... 警告:路径必须是字符串。收到未定义
这是 Gruntfile.js 中的 grunt watch:
watch: {
//Watch files for changes during "grunt serve"
main: {
options: {
livereload: true,
livereloadOnError: false,
spawn: false
},
files: [createFolderGlobs(['*.js', '*.less','*.html','*.json']), '!src/bower_components/**/*.js', '!src/js/**/*.js', '!_SpecRunner.html','!.grunt'],
tasks: [] //all the tasks are run dynamically during the watch event handler
}
},
最佳答案
我发现了问题。你需要升级 grunt-contrib-jshint。
我有版本“grunt-contrib-jshint”:“~0.9”
更改为“grunt-contrib-jshint”:“^1.0.0”
错误现在消失了!
关于javascript - Grunt "watch"警告 : Path must be a string. 收到未定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33940278/