简体   繁体   English

node.js中的npm离子安装错误

[英]npm ionic install error in node.js

I'm quite upset by the day. 我今天很不高兴。 Give me best solution. 给我最好的解决方案。

Your environment has been set up for using Node.js 0.10.38 (x64) and npm. 您的环境已设置为使用Node.js 0.10.38(x64)和npm。

C:\Users\ASAR-KSS>npm install -g ionic
npm ERR! network getaddrinfo ENOTFOUND
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! System Windows_NT 6.1.7600
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ionic"
npm ERR! cwd C:\Users\ASAR-KSS
npm ERR! node -v v0.10.38
npm ERR! npm -v 1.4.28
npm ERR! syscall getaddrinfo
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\ASAR-KSS\npm-debug.log
npm ERR! not ok code 0

C:\Users\ASAR-KSS>

Update npm to the latest version . 将npm更新到最新版本 Try again. 再试一次。 Seems that it can't find the package, or you're using an outdated npm version. 似乎找不到软件包,或者您使用的是过时的npm版本。

If that doesn't work, check whether you're sitting behind a proxy or make sure you've not configured a proxy in the ~/.npmrc file. 如果这样不起作用,请检查您是否位于代理后面,或确保尚未在~/.npmrc文件中配置代理。

The error network getaddrinfo ENOTFOUND suggests that the http address for the package cannot be found or is being altered because you're sitting behind a proxy. 错误network getaddrinfo ENOTFOUND提示该软件包的http地址找不到或正在更改,因为您坐在代理后面。

if you want to install ionic 1, use nodejs 4.4.4 instead of node 6 or 7. After installation execute the folowing command line: 如果要安装离子1,请使用nodejs 4.4.4而不是节点6或7。安装后,执行以下命令行:

npm install -g cordova ionic@1.7.14

I try it and it resolve my problem 我尝试一下,它解决了我的问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM