Grunt不回报任何东西

时间:2015-03-13 10:07:47

标签: node.js gruntjs grunt-contrib-watch

我以前在我以前的计算机(已经死了)中使用地面,现在我尝试在我的新计算机中使用它。问题是我在使用它时没有得到任何回应。

更具体地说,我已经转到Gruntfile拒绝的文件夹,我运行命令grunt watch,但我没有得到Grunt的任何回复

我的命令行如下:

merianos@merianos-pc:~/Documents/repositories/project/wp-content/themes/cours-de-musique/bower_components/bootstrap$ grunt watch
merianos@merianos-pc:~/Documents/repositories/project/wp-content/themes/cours-de-musique/bower_components/bootstrap$

此外,我尝试了npm list --depth=0 | grep grunt-contrib-compass命令,得到了以下结果:

npm ERR! max depth reached: btoa@1.1.2, required by bootstrap@3.3.1
npm ERR! max depth reached: grunt@0.4.5, required by bootstrap@3.3.1
npm ERR! max depth reached: glob@4.0.6, required by bootstrap@3.3.1
npm ERR! max depth reached: grunt-autoprefixer@1.0.1, required by bootstrap@3.3.1
npm ERR! max depth reached: grunt-banner@0.2.3, required by bootstrap@3.3.1
npm ERR! max depth reached: grunt-contrib-clean@0.6.0, required by bootstrap@3.3.1
npm ERR! max depth reached: grunt-contrib-concat@0.5.0, required by bootstrap@3.3.1
npm ERR! max depth reached: grunt-contrib-connect@0.9.0, required by bootstrap@3.3.1
npm ERR! max depth reached: grunt-contrib-copy@0.7.0, required by bootstrap@3.3.1
npm ERR! max depth reached: grunt-contrib-csslint@0.3.1, required by bootstrap@3.3.1
npm ERR! max depth reached: grunt-contrib-cssmin@0.10.0, required by bootstrap@3.3.1
npm ERR! max depth reached: grunt-contrib-jade@0.13.0, required by bootstrap@3.3.1
npm ERR! max depth reached: grunt-contrib-jshint@0.10.0, required by bootstrap@3.3.1
npm ERR! max depth reached: grunt-contrib-less@0.12.0, required by bootstrap@3.3.1
npm ERR! max depth reached: grunt-contrib-qunit@0.5.2, required by bootstrap@3.3.1
npm ERR! max depth reached: grunt-contrib-uglify@0.6.0, required by bootstrap@3.3.1
npm ERR! max depth reached: grunt-contrib-watch@0.6.1, required by bootstrap@3.3.1
npm ERR! max depth reached: grunt-csscomb@3.0.0, required by bootstrap@3.3.1
npm ERR! max depth reached: grunt-exec@0.4.6, required by bootstrap@3.3.1
npm ERR! max depth reached: grunt-html-validation@0.1.18, required by bootstrap@3.3.1
npm ERR! max depth reached: grunt-jekyll@0.4.2, required by bootstrap@3.3.1
npm ERR! max depth reached: grunt-jscs@0.8.1, required by bootstrap@3.3.1
npm ERR! max depth reached: grunt-saucelabs@8.3.3, required by bootstrap@3.3.1
npm ERR! max depth reached: grunt-sed@0.1.1, required by bootstrap@3.3.1
npm ERR! max depth reached: load-grunt-tasks@1.0.0, required by bootstrap@3.3.1
npm ERR! max depth reached: npm-shrinkwrap@5.1.0, required by bootstrap@3.3.1
npm ERR! max depth reached: time-grunt@1.0.0, required by bootstrap@3.3.1
npm ERR! max depth reached: remarkable@1.4.2, required by bootstrap@3.3.1
npm ERR! not ok code 0

注意:在上一台计算机中使用的文件系统相同,并且正常工作,但现在在新计算机中我遇到了这个问题。您还应该知道我没有触及任何与此项目相关的文件。

更新1

我也尝试了grunt --version,结果再次相同:

merianos@merianos-pc:~/Documents/repositories/project/wp-content/themes/cours-de-musique/bower_components/bootstrap$ grunt --version
merianos@merianos-pc:~/Documents/repositories/project/wp-content/themes/cours-de-musique/bower_components/bootstrap$

1 个答案:

答案 0 :(得分:1)

问题解决了:

解决方案如下:

我打开文件/usr/local/bin/grunt,我替换了以下行

#!/usr/bin/env node

以下内容:

#!/usr/bin/env nodejs