npm安装express 公司上网设置代理
2017-12-07 10:20
423 查看
异常:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files (x86)\\nodejs\\\\node.exe',
1 verbose cli 'C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'express' ]
2 info using npm@2.7.4
3 info using node@v0.12.2
4 verbose node symlink C:\Program Files (x86)\nodejs\\node.exe
5 silly cache add args [ 'express', null ]
6 verbose cache add spec express
7 silly cache add parsed spec { raw: 'express',
7 silly cache add scope: null,
7 silly cache add name: 'express',
7 silly cache add rawSpec: '',
7 silly cache add spec: '*',
7 silly cache add type: 'range' }
8 verbose addNamed express@*
9 silly addNamed semver.valid null
10 silly addNamed semver.validRange *
11 silly addNameRange { name: 'express', range: '*', hasData: false }
12 silly mapToRegistry name express
13 silly mapToRegistry using default registry
14 silly mapToRegistry registry https://registry.npmjs.org/ 15 silly mapToRegistry uri https://registry.npmjs.org/express 16 verbose addNameRange registry:https://registry.npmjs.org/express not in flight; fetching
17 verbose request uri https://registry.npmjs.org/express 18 verbose request no auth needed
19 info attempt registry request try #1 at 09:48:35
20 verbose request id 4b1a32ff61036056
21 http request GET https://registry.npmjs.org/express 22 info retry will retry, error on last attempt: Error: connect ETIMEDOUT
23 info attempt registry request try #2 at 09:49:06
24 http request GET https://registry.npmjs.org/express 25 info retry will retry, error on last attempt: Error: connect ETIMEDOUT
26 info attempt registry request try #3 at 09:50:27
27 http request GET https://registry.npmjs.org/express 28 verbose stack Error: connect ETIMEDOUT
28 verbose stack at exports._errnoException (util.js:746:11)
28 verbose stack at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1000:19)
29 verbose cwd G:\zhongshiyou\ITMSFileDownLoad
30 error Windows_NT 6.3.9600
31 error argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "express"
32 error node v0.12.2
33 error npm v2.7.4
34 error code ETIMEDOUT
35 error errno ETIMEDOUT
36 error syscall connect
37 error network connect ETIMEDOUT
37 error network This is most likely not a problem with npm itself
37 error network and is related to network connectivity.
37 error network In most cases you are behind a proxy or have bad network settings.
37 error network
37 error network If you are behind a proxy, please make sure that the
37 error network 'proxy' config is set properly. See: 'npm help config'
38 verbose exit [ 1, true ]
异常原因:
公司设置了上网代理,通过nmp安装express模块,代理错误
解决办法:
1,重新设置代理
http://manjeshpv.com/: npm config set proxy http://192.168.1.1:8080(代理服务器:端口)
npm config set https-proxy http://proxy-domain.com:8080 (代理服务器:端口)
2,选择http方式
npm config set registry=“http://registry.npmjs.org”//设置npm源地址
3,公司的网络可能需要验证http://www.cnblogs.com/chrischeng/archive/2013/03/22/2975235.html:
set http_proxy_user=username
set http_proxy_password=password
4,还有建议说将proxy set null
1.原npm地址
2.设置国内镜像
a.通过config命令
b.命令行指定
c.编辑
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files (x86)\\nodejs\\\\node.exe',
1 verbose cli 'C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'express' ]
2 info using npm@2.7.4
3 info using node@v0.12.2
4 verbose node symlink C:\Program Files (x86)\nodejs\\node.exe
5 silly cache add args [ 'express', null ]
6 verbose cache add spec express
7 silly cache add parsed spec { raw: 'express',
7 silly cache add scope: null,
7 silly cache add name: 'express',
7 silly cache add rawSpec: '',
7 silly cache add spec: '*',
7 silly cache add type: 'range' }
8 verbose addNamed express@*
9 silly addNamed semver.valid null
10 silly addNamed semver.validRange *
11 silly addNameRange { name: 'express', range: '*', hasData: false }
12 silly mapToRegistry name express
13 silly mapToRegistry using default registry
14 silly mapToRegistry registry https://registry.npmjs.org/ 15 silly mapToRegistry uri https://registry.npmjs.org/express 16 verbose addNameRange registry:https://registry.npmjs.org/express not in flight; fetching
17 verbose request uri https://registry.npmjs.org/express 18 verbose request no auth needed
19 info attempt registry request try #1 at 09:48:35
20 verbose request id 4b1a32ff61036056
21 http request GET https://registry.npmjs.org/express 22 info retry will retry, error on last attempt: Error: connect ETIMEDOUT
23 info attempt registry request try #2 at 09:49:06
24 http request GET https://registry.npmjs.org/express 25 info retry will retry, error on last attempt: Error: connect ETIMEDOUT
26 info attempt registry request try #3 at 09:50:27
27 http request GET https://registry.npmjs.org/express 28 verbose stack Error: connect ETIMEDOUT
28 verbose stack at exports._errnoException (util.js:746:11)
28 verbose stack at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1000:19)
29 verbose cwd G:\zhongshiyou\ITMSFileDownLoad
30 error Windows_NT 6.3.9600
31 error argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "express"
32 error node v0.12.2
33 error npm v2.7.4
34 error code ETIMEDOUT
35 error errno ETIMEDOUT
36 error syscall connect
37 error network connect ETIMEDOUT
37 error network This is most likely not a problem with npm itself
37 error network and is related to network connectivity.
37 error network In most cases you are behind a proxy or have bad network settings.
37 error network
37 error network If you are behind a proxy, please make sure that the
37 error network 'proxy' config is set properly. See: 'npm help config'
38 verbose exit [ 1, true ]
异常原因:
公司设置了上网代理,通过nmp安装express模块,代理错误
解决办法:
1,重新设置代理
http://manjeshpv.com/: npm config set proxy http://192.168.1.1:8080(代理服务器:端口)
npm config set https-proxy http://proxy-domain.com:8080 (代理服务器:端口)
2,选择http方式
npm config set registry=“http://registry.npmjs.org”//设置npm源地址
3,公司的网络可能需要验证http://www.cnblogs.com/chrischeng/archive/2013/03/22/2975235.html:
set http_proxy_user=username
set http_proxy_password=password
4,还有建议说将proxy set null
1.原npm地址
npm config set registry http://registry.npmjs.org
2.设置国内镜像
a.通过config命令
npm config set registry https://registry.npm.taobao.org npm info underscore (如果上面配置正确这个命令会有字符串response)
b.命令行指定
npm --registry https://registry.npm.taobao.org info underscore
c.编辑
~/.npmrc加入下面内容
registry = https://registry.npm.taobao.org[/code]
3.使用nrm管理registry地址
a.下载nrmnpm install -g nrm
b.添加registry地址nrm add npm http://registry.npmjs.org[/code]nrm add taobao https://registry.npm.taobao.org[/code]
c.切换npm registry地址nrm use taobaonrm use npm
搜索镜像: https://npm.taobao.org
建立或使用镜像,参考: https://github.com/cnpm/cnpmjs.org
相关文章推荐
- npm安装使用淘宝代理的方法(设置registry参数)
- Ubuntu12.04 apt-get 使用公司代理进行上网的设置
- 公司代理上网,设置连接git方法
- nodejs npm安装不了 设置代理
- nodejs npm安装不了 设置代理
- 使用npm安装webpack失败时,可能被墙要为cmd命令行设置代理
- Myeclipse中Android模拟器 公司代理上网设置[图文详解]
- VMware 12安装虚拟机Mac OS X 10.10使用小技巧(虚拟机Mac OS X 10.10时间设置,虚拟机Mac OS X 10.10通过代理上网,Mac OS X 10.10虚拟机优化,VMware虚拟机相互复制)
- 如果在npm中设置代理,安装Modules
- VMWare安装Ubuntu10.10 server版的NAT方式上网方法,以及apt-get使用公司代理安装程序的方法
- android 代理上网设置
- 公司的代理 各种设置
- Android模拟器代理上网设置[图文详解]
- NPM 设置代理
- 代理本地局域网其他PC上网的设置
- 我们公司安装了个监控软件, 每个客户端都要安装,VB写的.可以得到上网记录,这是如何做到的?
- 为VMware虚拟机内安装的Ubuntu 16.04设置静态IP地址并且上网
- nodejs npm express windows 安装
- Git服务器代理上网安装出现问题的几个解决办法。
- 【资料整理】squid安装和配置代理上网