gpt4 book ai didi

command-line - GruntJS "bus error grunt watch"

转载 作者:行者123 更新时间:2023-12-04 16:20:20 25 4
gpt4 key购买 nike

当我尝试运行 grunt watch 时,我遇到了 GruntJS 错误.
它工作正常,直到文件发生变化
看着,然后,它看起来像这样:

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

号码 2464变化。似乎是 grunt 正在监视的端口?但是,我不确定。这是我的 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']);
};

在此先感谢所有帮助!

最佳答案

你使用 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/

关于command-line - GruntJS "bus error grunt watch",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20887400/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com