总线错误告警手表“ [英] GruntJS "bus error grunt watch"

查看:261
本文介绍了总线错误告警手表“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试运行 grunt watch 时,我遇到了与GruntJS的错误。
它工作正常,直到文件中有一个更改是
观看,然后,它看起来像这样:

 运行watch任务
等待... [1] 2464总线错误grunt watch

数字 2464 变化。它似乎是咕噜观看的港口?但是,我不确定。这是我的Gruntfile:

  module.exports = function(grunt){
use strict;

grunt.initConfig({
pkg:grunt.file.readJSON('package.json'),
sass:{
dist:{
选项:{
style:'compact'
},
文件:{
'css / style.css':'sass / style.scss',
}
}
},
手表:{
files:'sass / style.scss',
tasks:['sass']
}
});

grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');

grunt.registerTask('default',['sass']);
};感谢您提供所有帮助!


< h2_lin>解决方案

你使用Osx maverick吗?



结帐: https:// github。 com / gruntjs / grunt-contrib-watch / issues / 204



您需要将node.js升级到0.10.22版本:

 #检查您的Node.js版本。 v0.10.20仍然会被损坏
node -v

#清理节点缓存
sudo npm缓存清理-f

#安装节点二进制管理器'n'
sudo npm install -gn

#使用'n'管理器安装最新的稳定版本
sudo n stable

源:http://stephentvedt.com/blog/2013/11/16/grunt-js-watch-bus-error/


I'm having an error with GruntJS when I try to run a grunt watch. It works fine, until there is a change in the file it is watching, then, it looks something like this:

Running "watch" task
Waiting...[1]    2464 bus error  grunt watch

The number 2464 changes. It seems to be the port that grunt is watching on? But, I'm not sure. Here is my 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']);
};

Thanks in advance for all the help!

解决方案

Do you use Osx maverick?

checkout this: https://github.com/gruntjs/grunt-contrib-watch/issues/204

You need to upgrade node.js to 0.10.22 version:

# 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

source: http://stephentvedt.com/blog/2013/11/16/grunt-js-watch-bus-error/

这篇关于总线错误告警手表“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆