2013-05-01 109 views
1

我試圖在win7上製作最新的引導版本。要做到這一點,我遵循http://thomassileo.com/blog/2012/04/21/using-bootstrap-as-a-git-submodule/的指示。我安裝了nodeJS和NPM。當我嘗試運行:嘗試在win7上安裝uglify.js時出錯

npm install uglify-js -g 

我得到:

$ npm -g install uglify-js 
npm http GET https://registry.npmjs.org/uglify-js 
npm http 304 https://registry.npmjs.org/uglify-js 
npm http GET https://registry.npmjs.org/optimist 
npm http GET https://registry.npmjs.org/source-map 
npm http 304 https://registry.npmjs.org/optimist 
npm http GET https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz 
npm http 304 https://registry.npmjs.org/source-map 
npm ERR! error installing [email protected]  

npm ERR! Error: No compatible version found: [email protected]'>=0.1.7- <0.2.0-' 
npm ERR! Valid install targets: 
npm ERR! ["0.0.0","0.1.0","0.1.1","0.1.2","0.1.3"] 
npm ERR!  at installTargetsError (c:\Program Files (x86)\nodejs\node_modules\ 
npm\lib\cache.js:488:10) 
npm ERR!  at next_ (c:\Program Files (x86)\nodejs\node_modules\npm\lib\cache. 
js:438:17) 
npm ERR!  at next (c:\Program Files (x86)\nodejs\node_modules\npm\lib\cache.j 
s:415:44) 

對下一步該怎麼做任何想法?

感謝,

比爾

回答

1

https://github.com/mishoo/UglifyJS

UglifyJS is now available through NPM — npm install [email protected] should do the job. 

NOTE: The NPM package has been upgraded to UglifyJS2. If you need to install version 1.x 
you need to add `@1` to the command, as I did above. I strongly suggest you to try to 
upgrade, though this might not be simple (v2 has a completely different AST structure and API).