当我试图运行一个GruntJS时,grunt watch
出错了。它工作正常,直到它正在观察的文件中发生了更改,然后,它看起来如下所示:
Running "watch" task
Waiting...[1] 2464 bus error grunt watch
数字2464
发生变化。它似乎是咕哝着看的那个港口?但是我不确定。这是我的Gruntfile:
module.exports = function (grunt) {
"use strict";
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
options: {
style: 'compact'
},
files: {
'css/style.css': 'sass/style.scss',
}
}
},
watch: {
files: 'sass/style.scss',
tasks: ['sass']
}
});
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['sass']);
};
提前感谢您的帮助!
发布于 2014-01-02 17:03:23
你用过Osx吗?
查看以下内容:https://github.com/gruntjs/grunt-contrib-watch/issues/204
您需要将node.js升级到0.10.22版本:
# Check your version of Node.js. v0.10.20 will still be broken
node –v
# clean your node cache
sudo npm cache clean –f
# install node binary manager ’n’
sudo npm install -g n
# use said ’n’ manager to install latest stable version
sudo n stable
来源:http://stephentvedt.com/blog/2013/11/16/grunt-js-watch-bus-error/
发布于 2015-10-08 03:52:13
sass文件中的无效语法也会导致咕噜或吞咽导致总线错误退出。如果您已经更新了节点和重新安装模块,但没有成功,请尝试运行sass --watch <sass glob>
并查看是否有任何错误(导入循环可以安全地被忽略为原因)。
https://stackoverflow.com/questions/20887400
复制相似问题