4

我刚刚为 yeoman 安装了新版本的 webapp 生成器。

npm install -g generator-webapp
yo webapp

当我尝试运行 grunt 来构建应用程序时,它会出现一个modernizr 错误。

Running "modernizr" task

Enabled Extras
>> shiv
>> load
>> cssclasses

Looking for Modernizr references

in dist/styles/main.css
>> svg
>> input

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

>> Generating a custom Modernizr build

/Users/tim/server/javascript/test/node_modules/grunt-contrib-compass/node_modules/tmp/lib/tmp.js:261
  throw err;
        ^
SyntaxError: Invalid regular expression: /TEST__flexbox']=function(){return testPropsAll('flexWrap');};tests['flexboxlegacy']=function(){return testPropsAll('boxDirection');};tests['canvas']=function(){var elem=document.createElement('canvas');return!!(elem.getContext&&elem.getContext('2d'));};tests['canvastext']=function(){return!!(Modernizr['canvas']&&is(document.createElement('canvas').getContext('2d').fillText,'function'));};tests['webgl']= function(){return!!window.WebGLRenderingContext;};tests['touch']=function(){var bool;if(('ontouchstart' in window)||window.DocumentTouch&&document instanceof DocumentTouch){bool=true;}else{injectElementWithStyles(['@media (',prefixes.join('touch-enabled),('),mod,')','{#modernizr{top:9px;position:absolute}}__/: Range out of order in character class
    at new RegExp (<anonymous>)
    at RegExp (<anonymous>)
    at Object.Modulizr.ize (/Users/tim/server/javascript/test/node_modules/grunt-modernizr/lib/modulizr.js:247:33)
    at Object._Gruntifier.finalize (/Users/tim/server/javascript/test/node_modules/grunt-modernizr/lib/gruntifier.js:445:25)
    at Object.<anonymous> (/Users/tim/server/javascript/test/node_modules/grunt-modernizr/lib/gruntifier.js:425:11)
    at notify (/Users/tim/server/javascript/test/node_modules/grunt-modernizr/node_modules/promised-io/promise.js:199:22)
    at notifyAll (/Users/tim/server/javascript/test/node_modules/grunt-modernizr/node_modules/promised-io/promise.js:179:5)
    at Deferred.resolve.callback.emitSuccess (/Users/tim/server/javascript/test/node_modules/grunt-modernizr/node_modules/promised-io/promise.js:223:3)
    at notify (/Users/tim/server/javascript/test/node_modules/grunt-modernizr/node_modules/promised-io/promise.js:217:31)
    at notifyAll (/Users/tim/server/javascript/test/node_modules/grunt-modernizr/node_modules/promised-io/promise.js:179:5)
4

1 回答 1

0

这是一个错误,现在已解决

于 2014-03-11T17:34:21.700 回答