在Mac OS X Yosemite上安装Ionic框架的问题

时间:2015-08-01 23:32:29

标签: node.js macos cordova ionic failed-installation

我正在尝试在Mac OS X Yosemite(10.10)的Mac-mini上安装Ionic框架。根据{{​​3}}

  1. http://ionicframework.com/getting-started/

  2. 安装了Node.js.
  3. 之后我从终端运行以下命令$ sudo npm install -g cordova ionic

  4. 但是我遇到了以下问题:

    rohits-Mac-mini:~ rohitdhamija$ sudo npm install -g cordova ionic
    
    npm WARN engine cordova-js@4.0.0: wanted: {"node":"~0.10.x"} (current: {"node":"0.12.7","npm":"2.13.3"})
    
    npm WARN engine npm@1.3.4: wanted: {"node":">=0.6","npm":"1"} (current: {"node":"0.12.7","npm":"2.13.3"})
    
    npm WARN installMany normalize-package-data was bundled with npm@1.3.4, but bundled package wasn't found in unpacked tree
    
    npm WARN engine xmlbuilder@2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"0.12.7","npm":"2.13.3"})
    
    /usr/local/bin/cordova -> /usr/local/lib/node_modules/cordova/bin/cordova
    
    npm ERR! Darwin 14.0.0
    
    npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "cordova" "ionic"
    
    npm ERR! node v0.12.7
    
    npm ERR! npm  v2.13.3
    
    npm ERR! code ECONNRESET
    
    npm ERR! errno ECONNRESET
    
    npm ERR! sys call read  
    

    我在SO上看到了类似的帖子,但它没有解决问题。如果有人帮助的话会很棒。

    更新 我试图安装cordova,它已成功安装。之后,我尝试安装离子,但它DIDNOT得到安装。

    rohits-Mac-mini:~ rohitdhamija$ npm -v
    2.13.3
    rohits-Mac-mini:~ rohitdhamija$ node -v
    v0.12.7
    rohits-Mac-mini:~ rohitdhamija$ cordova -v
    5.1.1
    

    以下是详细日志

    rohits-Mac-mini:~ rohitdhamija$ sudo npm install -g ionic
    npm ERR! Darwin 14.0.0
    npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "ionic"
    npm ERR! node v0.12.7
    npm ERR! npm  v2.13.3
    npm ERR! code ECONNRESET
    npm ERR! errno ECONNRESET
    npm ERR! syscall read
    
    npm ERR! network read ECONNRESET
    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! Darwin 14.0.0
    npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "ionic"
    npm ERR! node v0.12.7
    npm ERR! npm  v2.13.3
    npm ERR! code ECONNRESET
    npm ERR! errno ECONNRESET
    npm ERR! syscall read
    
    npm ERR! network read ECONNRESET
    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! Darwin 14.0.0
    npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "ionic"
    npm ERR! node v0.12.7
    npm ERR! npm  v2.13.3
    npm ERR! code ECONNRESET
    npm ERR! errno ECONNRESET
    npm ERR! syscall read
    
    npm ERR! network read ECONNRESET
    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! Darwin 14.0.0
    npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "ionic"
    npm ERR! node v0.12.7
    npm ERR! npm  v2.13.3
    npm ERR! code ECONNRESET
    npm ERR! errno ECONNRESET
    npm ERR! syscall read
    
    npm ERR! network read ECONNRESET
    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! Darwin 14.0.0
    npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "ionic"
    npm ERR! node v0.12.7
    npm ERR! npm  v2.13.3
    npm ERR! code ECONNRESET
    npm ERR! errno ECONNRESET
    npm ERR! syscall read
    
    npm ERR! network read ECONNRESET
    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! Darwin 14.0.0
    npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "ionic"
    npm ERR! node v0.12.7
    npm ERR! npm  v2.13.3
    npm ERR! code ECONNRESET
    npm ERR! errno ECONNRESET
    npm ERR! syscall read
    
    npm ERR! network read ECONNRESET
    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! Darwin 14.0.0
    npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "ionic"
    npm ERR! node v0.12.7
    npm ERR! npm  v2.13.3
    npm ERR! code ECONNRESET
    npm ERR! errno ECONNRESET
    npm ERR! syscall read
    
    npm ERR! network read ECONNRESET
    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! Darwin 14.0.0
    npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "ionic"
    npm ERR! node v0.12.7
    npm ERR! npm  v2.13.3
    npm ERR! code ECONNRESET
    npm ERR! errno ECONNRESET
    npm ERR! syscall read
    
    npm ERR! network read ECONNRESET
    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! Darwin 14.0.0
    npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "ionic"
    npm ERR! node v0.12.7
    npm ERR! npm  v2.13.3
    npm ERR! code ECONNRESET
    npm ERR! errno ECONNRESET
    npm ERR! syscall read
    
    npm ERR! network read ECONNRESET
    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! Darwin 14.0.0
    npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "ionic"
    npm ERR! node v0.12.7
    npm ERR! npm  v2.13.3
    npm ERR! code ECONNRESET
    npm ERR! errno ECONNRESET
    npm ERR! syscall read
    
    npm ERR! network read ECONNRESET
    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! Darwin 14.0.0
    npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "ionic"
    npm ERR! node v0.12.7
    npm ERR! npm  v2.13.3
    npm ERR! code ECONNRESET
    npm ERR! errno ECONNRESET
    npm ERR! syscall read
    
    npm ERR! network read ECONNRESET
    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! Darwin 14.0.0
    npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "ionic"
    npm ERR! node v0.12.7
    npm ERR! npm  v2.13.3
    npm ERR! code ECONNRESET
    npm ERR! errno ECONNRESET
    npm ERR! syscall read
    
    npm ERR! network read ECONNRESET
    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! Darwin 14.0.0
    npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "ionic"
    npm ERR! node v0.12.7
    npm ERR! npm  v2.13.3
    npm ERR! code ECONNRESET
    npm ERR! errno ECONNRESET
    npm ERR! syscall read
    
    npm ERR! network read ECONNRESET
    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! Darwin 14.0.0
    npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "ionic"
    npm ERR! node v0.12.7
    npm ERR! npm  v2.13.3
    npm ERR! code ECONNRESET
    npm ERR! errno ECONNRESET
    npm ERR! syscall read
    
    npm ERR! network read ECONNRESET
    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! Darwin 14.0.0
    npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "ionic"
    npm ERR! node v0.12.7
    npm ERR! npm  v2.13.3
    npm ERR! code ECONNRESET
    npm ERR! errno ECONNRESET
    npm ERR! syscall read
    
    npm ERR! network read ECONNRESET
    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! Darwin 14.0.0
    npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "ionic"
    npm ERR! node v0.12.7
    npm ERR! npm  v2.13.3
    npm ERR! code ECONNRESET
    npm ERR! errno ECONNRESET
    npm ERR! syscall read
    
    npm ERR! network read ECONNRESET
    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! Darwin 14.0.0
    npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "ionic"
    npm ERR! node v0.12.7
    npm ERR! npm  v2.13.3
    npm ERR! code ECONNRESET
    npm ERR! errno ECONNRESET
    npm ERR! syscall read
    
    npm ERR! network read ECONNRESET
    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! Darwin 14.0.0
    npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "ionic"
    npm ERR! node v0.12.7
    npm ERR! npm  v2.13.3
    npm ERR! code ECONNRESET
    npm ERR! errno ECONNRESET
    npm ERR! syscall read
    
    npm ERR! network read ECONNRESET
    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! Darwin 14.0.0
    npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "ionic"
    npm ERR! node v0.12.7
    npm ERR! npm  v2.13.3
    npm ERR! code ECONNRESET
    npm ERR! errno ECONNRESET
    npm ERR! syscall read
    
    npm ERR! network read ECONNRESET
    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! Darwin 14.0.0
    npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "ionic"
    npm ERR! node v0.12.7
    npm ERR! npm  v2.13.3
    npm ERR! code ECONNRESET
    npm ERR! errno ECONNRESET
    npm ERR! syscall read
    
    npm ERR! network read ECONNRESET
    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'
    
      [Restored]
    

2 个答案:

答案 0 :(得分:1)

是的,看起来问题主要来自服务提供商。 我切换了互联网服务提供商,一切正常,有点奇怪,但这是一个解决方案。

答案 1 :(得分:0)

这似乎是我的服务提供商的问题。我从BSNL网络切换到Airtel并再次尝试。它安装成功!似乎BSNL禁用了一些服务器数据。