簡體   English   中英

使用NPM安裝Node.js

[英]Using npm to install nodejs

我嘗試使用npm安裝express-generator(或angular-cli),但未成功。 這是一個錯誤,如下所示:

...
30 verbose stack Error: connect ETIMEDOUT 151.101.40.162:443
30 verbose stack     at Object.exports._errnoException (util.js:1022:11)
30 verbose stack     at exports._exceptionWithHostPort (util.js:1045:20)
30 verbose stack     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14)
31 verbose cwd E:\nodejs\hello
32 error Windows_NT 6.1.7601
33 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "express-generator"
34 error node v7.3.0
35 error npm  v3.10.10
36 error code ETIMEDOUT
37 error errno ETIMEDOUT
38 error syscall connect
39 error network connect ETIMEDOUT 151.101.40.162:443
40 error network This is most likely not a problem with npm itself
40 error network and is related to network connectivity.
40 error network In most cases you are behind a proxy or have bad network settings.
40 error network
40 error network If you are behind a proxy, please make sure that the
40 error network 'proxy' config is set properly.  See: 'npm help config'
41 verbose exit [ 1, true ]

如果您使用代理,請確保正確設置了“代理”配置。 請參閱:“ npm幫助配置”

如果您位於Windows防火牆后面,則必須使用代理連接到npm注冊表。

您可以通過兩種方式創建代理

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM