2013-10-06 151 views
4

我剛剛爲yeoman安裝了新版本的webapp生成器。爲什麼yeoman webapp-generator被破壞?

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) 
+1

剛擡起頭對別人誰抵達這裏,已經不再是一個問題,因爲寫這個的。 – technoSpino

回答

0

這是一個bug這是目前解決

相關問題