Grunt Uglifying致命错误:意外的角色''

时间:2014-08-19 14:20:14

标签: gruntjs yeoman grunt-contrib-uglify

这是我尝试Yeoman的考试时间。我按照非常简单的步骤使用yo webapp

安装和设置我的webapp

用bower安装了第三方JS库(skrollr)。

除了它纯粹的html / js / scss编辑。

但是当我运行grunt --force时,我收到以下错误,无法继续。

Running "modernizr:dist" (modernizr) task

Enabled Extras
>> shiv
>> load
>> cssclasses

Looking for Modernizr references

in dist/styles/main.css
>> svg

Downloading source files
cache modernizr-latest.js
cache modernizr.load.1.5.4.js

>> Generating a custom Modernizr build
>> Uglifying
Fatal error: Unexpected character ''

我不知道它来自哪里。任何人都知道如何解决这个问题?

如果你想知道为什么我使用了 - 强制它由于这些微不足道的错误:

app/scripts/main.js
  line 4   col 3   Expected 'var' to have an indentation at 5 instead at 3.
  line 5   col 3   Expected 'var' to have an indentation at 5 instead at 3.
  line 7   col 3   Expected '$' to have an indentation at 5 instead at 3.
  line 9   col 3   Expected 'var' to have an indentation at 5 instead at 3.
  line 10  col 7   Expected 'render' to have an indentation at 9 instead at 7.
  line 13  col 7   Expected '}' to have an indentation at 9 instead at 7.
  line 14  col 3   Expected '}' to have an indentation at 5 instead at 3.
  line 9   col 11  'skrollr' is not defined.
  line 4   col 15  'winWidth' is defined but never used.
  line 9   col 8   's' is defined but never used.
  line 10  col 28  'data' is defined but never used.

✖ 11 problems

更新 刚试过一个新的yo webapp然后grunt它遇到了同样的问题。

0 个答案:

没有答案