安装角度cli错误ubantu 14.06

时间:2018-03-07 04:47:02

标签: angular angular-cli npm-install

我正在尝试在

上安装angular命令行界面

ubantu 14.06 但是当我在终端

中运行此命令时

我收到此错误:

我有节点4.2.6

和npm 3.5.2安装 代理:

ubuntu@ubuntu-Inspiron-3521:~/Desktop/Python-2.7.14$ npm config get proxy

http://proxy/:port

错误:

    ubuntu@ubuntu-Inspiron-3521:~/Desktop/Python-2.7.14$ npm install -g angular-cli
npm ERR! Linux 4.4.0-21-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "angular-cli"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! code ECONNRESET

npm ERR! network tunneling socket could not be established, cause=getaddrinfo ENOTFOUND proxy proxy:80
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!     /home/ubuntu/Desktop/Python-2.7.14/npm-debug.log

我也尝试这个命令

sudo npm -i --global install angular-cli

但它给出了同样的错误 我的npm-debug.log文件是这个

  
  0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs',
1 verbose cli   '/usr/bin/npm',
1 verbose cli   'install',
1 verbose cli   '-g',
1 verbose cli   'angular-cli' ]
2 info using npm@3.5.2
3 info using node@v4.2.6
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly fetchPackageMetaData angular-cli
8 silly fetchNamedPackageData angular-cli
9 silly mapToRegistry name angular-cli
10 silly mapToRegistry using default registry
11 silly mapToRegistry registry https://registry.npmjs.org/
12 silly mapToRegistry uri https://registry.npmjs.org/angular-cli
13 verbose request uri https://registry.npmjs.org/angular-cli
14 verbose request no auth needed
15 info attempt registry request try #1 at 9:55:45 AM
16 verbose request id 9ad243bd0c6a185a
17 http request GET https://registry.npmjs.org/angular-cli
18 info retry will retry, error on last attempt: Error: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND
         

代理     代理:80         19信息尝试注册请求在上午9:55:55尝试#2         20 http请求GET https://registry.npmjs.org/angular-cli         21信息重试将重试,最后一次尝试时出错:错误:无法建立隧道套接字,原因= getaddrinfo ENOTFOUND     代理     代理:80         22信息尝试注册表请求在上午9:56:55尝试#3         23 http请求GET https://registry.npmjs.org/angular-cli         24傻fetchPackageMetaData错误:无法建立隧道套接字,原因= getaddrinfo ENOTFOUND代理代理:80         ClientRequest.onError上的24个傻fetchPackageMetaData(/usr/share/npm/node_modules/request/node_modules/tunnel-agent/index.js:174:17)         ClientRequest.g上24个傻fetchPackageMetaData(events.js:260:16)         emitOne上有24个傻fetchPackageMetaData(events.js:77:13)         ClientRequest.emit上的24个傻fetchPackageMetaData(events.js:169:7)         Socket.socketErrorListener上的24个傻fetchPackageMetaData(_http_client.js:258:9)         emitOne上有24个傻fetchPackageMetaData(events.js:77:13)         Socket.emit上的24个傻fetchPackageMetaData(events.js:169:7)         connectErrorNT上的24个傻fetchPackageMetaData(net.js:998:8)         nextTickCallbackWith2Args上的24个傻fetchPackageMetaData(node.js:441:9)         process._tickCallback上的24个傻fetchPackageMetaData(node.js:355:17)         对于angular-cli {24错误:隧道套接字无法建立,因为= getaddrinfo ENOTFOUND     代理代理:80]代码:'ECONNRESET'}         25傻rollbackFailedOptional开始         26愚蠢的rollbackFailedOptional整理         27傻runTopLevelLifecycles开始         28傻runTopLevelLifecycles整理         29傻安装printInstalled         30详细堆栈错误:无法建立隧道套接字,cause = getaddrinfo ENOTFOUND代理代理:80         ClientRequest.onError上的30个详细堆栈(/usr/share/npm/node_modules/request/node_modules/tunnel-agent/index.js:174:17)         ClientRequest.g上的30个详细堆栈(events.js:260:16)         emitOne上的30个详细堆栈(events.js:77:13)         ClientRequest.emit上的30个详细堆栈(events.js:169:7)         30个详细堆栈在Socket.socketErrorListener(_http_client.js:258:9)         emitOne上的30个详细堆栈(events.js:77:13)         30个详细堆栈在Socket.emit(events.js:169:7)         connectErrorNT上的30个详细堆栈(net.js:998:8)         nextTickCallbackWith2Args上的30个详细堆栈(node.js:441:9)         进程中的30个详细堆栈._tickCallback(node.js:355:17)         31 verbose cwd /home/ubuntu/Desktop/Python-2.7.14         32错误Linux 4.4.0-21-generic

  

提前感谢。

0 个答案:

没有答案