哟 angular 生成器错误 phantomjs 安装
yo angular generator error phantomjs install
我尝试安装 yo anugular
并遇到以下错误,我尝试更新 node
、npm
、npm cache clean
等,但它不起作用。
当我 运行 $ yo angular
它使用 bower
获取依赖项但它给出了这个错误并继续
npm WARN engine karma@0.12.31: wanted: {"node":"~0.8 || ~0.10"} (current: {"node":"0.12.0","npm":"2.5.0"})
...
> phantomjs@1.9.15 install
/Users/jhondoe/Desktop/webapp/node_modules/karma-phantomjs-launcher/node_modules/phantomjs
> node install.js
Downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-macosx.zip
Saving to /var/folders/vy/sc6v8frj4d3gprgzdpfcjhkm0000gn/T/phantomjs/phantomjs-1.9.8-macosx.zip
Receiving...
npm ERR! Darwin 13.0.0---------------------] 37% 0.0s|
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.0
npm ERR! npm v2.5.0
npm ERR! null == true
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <http://github.com/npm/npm/issues>
[=======================================-] 98% 0.0s
Received 9187K total.
Extracting zip contents
之后出现更多错误和一些警告
npm WARN unmet dependency /Users/jhondoe/Desktop/webapp/node_modules/grunt-contrib-jshint/node_modules/jshint/node_modules/cli/node_modules/glob requires minimatch@'0.3' but will load
和错误
> pngquant-bin@2.0.3 postinstall
/Users/jhondoe/Desktop/webapp/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-pngquant/node_modules/pngquant-bin
> node lib/install.js
✔ pngquant pre-build test passed successfully
npm ERR! Please include the following file with any support request:
npm ERR! /Users/jhondoe/Desktop/webapp/npm-debug.log
Loading "cssmin.js" tasks...ERROR
>> Error: Cannot find module 'pako/lib/zlib/messages'
Loading "uglify.js" tasks...ERROR
>> Error: Cannot find module 'pako/lib/zlib/messages'
之后它无法在消息下方说
Loading "cssmin.js" tasks...ERROR
>> Error: Cannot find module 'pako/lib/zlib/messages'
Loading "uglify.js" tasks...ERROR
>> Error: Cannot find module 'pako/lib/zlib/messages'
...
Running "karma:unit" (karma) task
INFO [karma]: Karma v0.12.31 server started at http://localhost:8080/
INFO [launcher]: Starting browser PhantomJS
WARN [watcher]: Pattern "/Users/jhondoe/Desktop/webapp/test/mock/**/*.js" does not match any file.
INFO [PhantomJS 1.9.8 (Mac OS X)]: Connected on socket jYytgLM38t_yiNPOWqbq with id 15305149
PhantomJS 1.9.8 (Mac OS X): Executed 2 of 2 SUCCESS (0.004 secs / 0.02 secs)
Warning: Task "cssmin" not found. Use --force to continue.
Aborted due to warnings.
我从 6 小时开始就一直在敲头,请帮助我如何解决它。
我的节点版本是 v0.12.0
NPM 是 2.5.0
和 OSX 10.9
找到问题了,是node的版本问题,看到警告
npm WARN engine karma@0.12.31: wanted: {"node":"~0.8 || ~0.10"} (current: {"node":"0.12.0","npm":"2.5.0"})
将 Node
降级到 0.10.30
解决了这个问题
我已经发布了这个答案,以便其他人可以解决那里的类似问题。
我尝试安装 yo anugular
并遇到以下错误,我尝试更新 node
、npm
、npm cache clean
等,但它不起作用。
当我 运行 $ yo angular
它使用 bower
获取依赖项但它给出了这个错误并继续
npm WARN engine karma@0.12.31: wanted: {"node":"~0.8 || ~0.10"} (current: {"node":"0.12.0","npm":"2.5.0"})
...
> phantomjs@1.9.15 install
/Users/jhondoe/Desktop/webapp/node_modules/karma-phantomjs-launcher/node_modules/phantomjs
> node install.js
Downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-macosx.zip
Saving to /var/folders/vy/sc6v8frj4d3gprgzdpfcjhkm0000gn/T/phantomjs/phantomjs-1.9.8-macosx.zip
Receiving...
npm ERR! Darwin 13.0.0---------------------] 37% 0.0s|
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.0
npm ERR! npm v2.5.0
npm ERR! null == true
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <http://github.com/npm/npm/issues>
[=======================================-] 98% 0.0s
Received 9187K total.
Extracting zip contents
之后出现更多错误和一些警告
npm WARN unmet dependency /Users/jhondoe/Desktop/webapp/node_modules/grunt-contrib-jshint/node_modules/jshint/node_modules/cli/node_modules/glob requires minimatch@'0.3' but will load
和错误
> pngquant-bin@2.0.3 postinstall
/Users/jhondoe/Desktop/webapp/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-pngquant/node_modules/pngquant-bin
> node lib/install.js
✔ pngquant pre-build test passed successfully
npm ERR! Please include the following file with any support request:
npm ERR! /Users/jhondoe/Desktop/webapp/npm-debug.log
Loading "cssmin.js" tasks...ERROR
>> Error: Cannot find module 'pako/lib/zlib/messages'
Loading "uglify.js" tasks...ERROR
>> Error: Cannot find module 'pako/lib/zlib/messages'
之后它无法在消息下方说
Loading "cssmin.js" tasks...ERROR
>> Error: Cannot find module 'pako/lib/zlib/messages'
Loading "uglify.js" tasks...ERROR
>> Error: Cannot find module 'pako/lib/zlib/messages'
...
Running "karma:unit" (karma) task
INFO [karma]: Karma v0.12.31 server started at http://localhost:8080/
INFO [launcher]: Starting browser PhantomJS
WARN [watcher]: Pattern "/Users/jhondoe/Desktop/webapp/test/mock/**/*.js" does not match any file.
INFO [PhantomJS 1.9.8 (Mac OS X)]: Connected on socket jYytgLM38t_yiNPOWqbq with id 15305149
PhantomJS 1.9.8 (Mac OS X): Executed 2 of 2 SUCCESS (0.004 secs / 0.02 secs)
Warning: Task "cssmin" not found. Use --force to continue.
Aborted due to warnings.
我从 6 小时开始就一直在敲头,请帮助我如何解决它。
我的节点版本是 v0.12.0
NPM 是 2.5.0
和 OSX 10.9
找到问题了,是node的版本问题,看到警告
npm WARN engine karma@0.12.31: wanted: {"node":"~0.8 || ~0.10"} (current: {"node":"0.12.0","npm":"2.5.0"})
将 Node
降级到 0.10.30
解决了这个问题
我已经发布了这个答案,以便其他人可以解决那里的类似问题。