Mac 下 Ionic 安装出错,包下不下来

不明开发者 发布于 2015/09/26 14:56
阅读 3K+
收藏 0

如题:

node v4.1.1

npm  v2.14.6

然后用命令行。$sudo npm install cordova 安装了cordova 5.3.1

在用命令行@sudo npm install -g ionic时 报许多错误,我网上查了下,就用淘宝镜像和 cnpm

.npmrc 里配置如下:

proxy=http://npm.taobao.org/
#proxy=null
registry=https://registry.npm.taobao.org

代理不知道是否配置正确。

结果还有大部分的错误。类似:

wjwdeMacBook-Pro:~ wjw$ cnpm install ionic

npm ERR! fetch failed https://registry.npmjs.org/form-data/-/form-data-0.1.4.tgz

npm WARN retry will retry, error on last attempt: Error: socket hang up

npm ERR! fetch failed https://registry.npmjs.org/colors/-/colors-0.6.2.tgz

npm WARN retry will retry, error on last attempt: Error: socket hang up

npm ERR! fetch failed https://registry.npmjs.org/semver/-/semver-4.3.6.tgz

npm WARN retry will retry, error on last attempt: Error: socket hang up

npm ERR! fetch failed https://registry.npmjs.org/connect/-/connect-3.1.1.tgz

npm WARN retry will retry, error on last attempt: Error: socket hang up

npm ERR! fetch failed https://registry.npmjs.org/proxy-middleware/-/proxy-middleware-0.7.0.tgz

npm WARN retry will retry, error on last attempt: Error: socket hang up

npm ERR! fetch failed https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz

npm WARN retry will retry, error on last attempt: Error: socket hang up

npm ERR! fetch failed https://registry.npmjs.org/q/-/q-1.0.1.tgz

npm WARN retry will retry, error on last attempt: Error: socket hang up

npm ERR! fetch failed https://registry.npmjs.org/serve-static/-/serve-static-1.7.1.tgz

npm WARN retry will retry, error on last attempt: Error: socket hang up

npm ERR! fetch failed https://registry.npmjs.org/ionic-app-lib/-/ionic-app-lib-0.3.8.tgz

npm WARN retry will retry, error on last attempt: Error: socket hang up

npm ERR! fetch failed https://registry.npmjs.org/open/-/open-0.0.5.tgz

npm WARN retry will retry, error on last attempt: Error: socket hang up

npm ERR! fetch failed https://registry.npmjs.org/cli-table/-/cli-table-0.3.1.tgz

npm WARN retry will retry, error on last attempt: Error: socket hang up

npm ERR! fetch failed https://registry.npmjs.org/request/-/request-2.51.0.tgz

npm WARN retry will retry, error on last attempt: Error: socket hang up

npm ERR! fetch failed https://registry.npmjs.org/progress/-/progress-1.1.7.tgz

npm WARN retry will retry, error on last attempt: Error: socket hang up

npm ERR! fetch failed https://registry.npmjs.org/optimist/-/optimist-0.6.0.tgz

npm WARN retry will retry, error on last attempt: Error: socket hang up

npm ERR! fetch failed https://registry.npmjs.org/async/-/async-0.9.2.tgz

npm WARN retry will retry, error on last attempt: Error: socket hang up

npm ERR! fetch failed https://registry.npmjs.org/cheerio/-/cheerio-0.19.0.tgz

npm WARN retry will retry, error on last attempt: Error: socket hang up

npm ERR! fetch failed https://registry.npmjs.org/serve-static/-/serve-static-1.7.1.tgz

npm WARN retry will retry, error on last attempt: Error: socket hang up

npm ERR! fetch failed https://registry.npmjs.org/cli-table/-/cli-table-0.3.1.tgz

npm WARN retry will retry, error on last attempt: Error: socket hang up

npm ERR! fetch failed https://registry.npmjs.org/proxy-middleware/-/proxy-middleware-0.7.0.tgz

npm WARN retry will retry, error on last attempt: Error: socket hang up

npm ERR! fetch failed https://registry.npmjs.org/open/-/open-0.0.5.tgz

npm WARN retry will retry, error on last attempt: Error: socket hang up

npm ERR! fetch failed https://registry.npmjs.org/progress/-/progress-1.1.7.tgz

npm WARN retry will retry, error on last attempt: Error: socket hang up

npm ERR! fetch failed https://registry.npmjs.org/async/-/async-0.9.2.tgz

npm WARN retry will retry, error on last attempt: Error: socket hang up

npm ERR! fetch failed https://registry.npmjs.org/semver/-/semver-4.3.6.tgz

npm WARN retry will retry, error on last attempt: Error: socket hang up

npm ERR! fetch failed https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz

npm WARN retry will retry, error on last attempt: Error: socket hang up

npm ERR! fetch failed https://registry.npmjs.org/cheerio/-/cheerio-0.19.0.tgz

npm WARN retry will retry, error on last attempt: Error: socket hang up

npm ERR! fetch failed https://registry.npmjs.org/q/-/q-1.0.1.tgz

npm WARN retry will retry, error on last attempt: Error: socket hang up

npm ERR! Darwin 14.3.0

npm ERR! argv "/usr/local/bin/node" "/usr/local/lib/node_modules/cnpm/node_modules/.bin/npm" "--userconfig=/Users/wjw/.cnpmrc" "--disturl=https://npm.taobao.org/mirrors/node" "--cache=/Users/wjw/.cnpm" "--registry=https://registry.npm.taobao.org" "--node-gyp=/usr/local/lib/node_modules/cnpm/node_modules/node-gyp/bin/node-gyp.js" "install" "ionic"

npm ERR! node v4.1.1

npm ERR! npm  v2.14.6

npm ERR! code ETIMEDOUT

npm ERR! errno ETIMEDOUT

npm ERR! syscall read

npm ERR! network read ETIMEDOUT

npm ERR! network This is most likely not a problem with npm itself

npm ERR! network and is related to network connectivity.

npm ERR! network In most cases you are behind a proxy or have bad network settings.

npm ERR! network 

npm ERR! network If you are behind a proxy, please make sure that the

npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! fetch failed https://registry.npmjs.org/serve-static/-/serve-static-1.7.1.tgz

npm ERR! Darwin 14.3.0

npm ERR! argv "/usr/local/bin/node" "/usr/local/lib/node_modules/cnpm/node_modules/.bin/npm" "--userconfig=/Users/wjw/.cnpmrc" "--disturl=https://npm.taobao.org/mirrors/node" "--cache=/Users/wjw/.cnpm" "--registry=https://registry.npm.taobao.org" "--node-gyp=/usr/local/lib/node_modules/cnpm/node_modules/node-gyp/bin/node-gyp.js" "install" "ionic"

npm ERR! node v4.1.1

npm ERR! npm  v2.14.6

npm ERR! code ETIMEDOUT

npm ERR! errno ETIMEDOUT

npm ERR! syscall read

npm ERR! network read ETIMEDOUT

npm ERR! network This is most likely not a problem with npm itself

npm ERR! network and is related to network connectivity.

npm ERR! network In most cases you are behind a proxy or have bad network settings.

npm ERR! network 

npm ERR! network If you are behind a proxy, please make sure that the

npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! Please include the following file with any support request:

npm ERR!     /Users/wjw/npm-debug.log

好像就是包抓不下来,请问该如何解决?





加载中
0
zabcd117
zabcd117
应该是墙的原因了,换一个国内的npm源啊,淘宝不是有么
z
zhouwude
回复 @不明开发者 : 你好 我也遇到 了这个问题 请问您解决了吗
不明开发者
不明开发者
是用的淘宝的镜像,registry=https://registry.npm.taobao.org 我都背熟了。node.js换了好几个版本,都不行,就有一次能抓下来几个包,还是安装出错了。cordova用$sudo npm install -g cordova 能安装成功。。ionic 就是死活安装不成功。还有可能是哪个原因?我用vpn 也不行。。谢谢
-1
notreami
notreami
砸了。。
不明开发者
不明开发者
你也遇到过这样的问题?
返回顶部
顶部