Gruntjs JSHint在生成Yeoman webapp后失败,出现Timer.listOnTimeout错误

Gruntjs JSHint在生成Yeoman webapp后失败,出现Timer.listOnTimeout错误,gruntjs,yeoman,jshint,grunt-contrib-jshint,Gruntjs,Yeoman,Jshint,Grunt Contrib Jshint,使用yo webapp生成新的Yeoman webapp后,运行grunt会出现JSHint错误: $ grunt Running "newer:jshint" (newer) task Running "newer:jshint:all" (newer) task Running "jshint:all" (jshint) task test/spec/test.js line 11 col 9 Expected '}' to have an indentation at 11

使用
yo webapp
生成新的Yeoman webapp后,运行
grunt
会出现JSHint错误:

$ grunt
Running "newer:jshint" (newer) task

Running "newer:jshint:all" (newer) task

Running "jshint:all" (jshint) task

test/spec/test.js
  line 11  col 9  Expected '}' to have an indentation at 11 instead at 9.
  line 12  col 5  Expected '}' to have an indentation at 7 instead at 5.
  line 13  col 1  Expected '}' to have an indentation at 3 instead at 1.

✖ 3 problems

Warning: Task "jshint:all" failed. Use --force to continue.
Error: Task "jshint:all" failed.
    at Task.<anonymous> (/Users/ollieglass/code/ati/node_modules/grunt/lib/util/task.js:205:15)
    at null._onTimeout (/Users/ollieglass/code/ati/node_modules/grunt/lib/util/task.js:241:33)
    at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)

Aborted due to warnings.


Execution Time (2014-07-13 10:56:57 UTC)
loading tasks  1.1s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 91%
jshint:all     97ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 8%
Total 1.2s
$grunt
运行“更新的:jshint”(更新的)任务
运行“更新的:jshint:all”(更新的)任务
运行“jshint:all”(jshint)任务
test/spec/test.js
第11行第9列预期“}”在11处有缩进,而不是在9处。
第12行第5列预期“}”在7处有缩进,而不是在5处。
第13行第1列预期“}”在3处有缩进,而不是在1处。
✖ 3个问题
警告:任务“jshint:all”失败。使用--force继续。
错误:任务“jshint:all”失败。
正在执行任务。(/Users/ollieglass/code/ati/node_modules/grunt/lib/util/task.js:205:15)
空时。_onTimeout(/Users/ollieglass/code/ati/node_modules/grunt/lib/util/task.js:241:33)
at Timer.listOnTimeout[as onttimeout](timers.js:110:15)
由于警告而中止。
执行时间(2014-07-13 10:56:57 UTC)
加载任务1.1s▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 91%
jshint:所有97毫秒▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 8%
总计1.2秒

这是什么原因造成的,如何修复?

通过卸载然后重新安装Node、npm和Yeoman解决了这一问题

我遇到了同样的问题,无法找到任何方法来修复它。我尝试过卸载/重新安装node和npm,但似乎不起作用。