安装npm时,主机名不匹配错误

时间:2018-09-01 12:36:20

标签: npm npm-install

这是我的npm日志,也尝试再次安装节点js,但仍然无法安装任何内容。尝试输入“ https://registry.npmjs.org”时,出现“错误严重:未知域。请检查此域是否已添加到服务中。”错误。

0 info it worked if it ends with ok`enter code here`    
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',    
1 verbose cli   
'C:\\Users\\Jazzy\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm- 
cli.js',    
1 verbose cli   'install',    
1 verbose cli   '-g',    
1 verbose cli   'npm@latest' ]    
2 info using npm@6.4.0    
3 info using node@v8.9.4    
4 verbose npm-session 8457f192f12a0e22    
5 silly install loadCurrentTree    
6 silly install readGlobalPackageData    
7 silly fetchPackageMetaData error for npm@latest request to 
https://registry.npmjs.org/npm failed, reason: Hostname/IP doesn't match 
certificate's altnames: "Host: registry.npmjs.org. is not in the cert's 
altnames: DNS:a.sni.fastly.net, DNS:a.sni.global-ssl.fastly.net"    
8 timing stage:rollbackFailedOptional Completed in 1ms    
9 timing stage:runTopLevelLifecycles Completed in 241ms    
10 verbose type system    
11 verbose stack FetchError: request to https://registry.npmjs.org/npm 
failed, reason: Hostname/IP doesn't match certificate's altnames: "Host: 
registry.npmjs.org. is not in the cert's altnames: DNS:a.sni.fastly.net, 
DNS:a.sni.global-ssl.fastly.net"    
11 verbose stack     at ClientRequest.req.on.err 
(C:\Users\Jazzy\AppData\Roaming\npm\node_modules\npm\node_modules\node- 
fetch-npm\src\index.js:68:14)    
11 verbose stack     at emitOne (events.js:116:13)    
11 verbose stack     at ClientRequest.emit (events.js:211:7)    
11 verbose stack     at TLSSocket.socketErrorListener 
(_http_client.js:387:9)    
11 verbose stack     at emitOne (events.js:116:13)    
11 verbose stack     at TLSSocket.emit (events.js:211:7)    
11 verbose stack     at emitErrorNT (internal/streams/destroy.js:64:8)    
11 verbose stack     at _combinedTickCallback     
(internal/process/next_tick.js:138:11)    
11 verbose stack     at process._tickCallback     
(internal/process/next_tick.js:180:9)    
12 verbose cwd C:\Users\Jazzy    
13 verbose Windows_NT 10.0.17134    
14 verbose argv "C:\\Program Files\\nodejs\\node.exe"     
"C:\\Users\\Jazzy\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm- 
cli.js" "install" "-g" "npm@latest"    
15 verbose node v8.9.4    
16 verbose npm  v6.4.0    
17 error request to https://registry.npmjs.org/npm failed, reason: 
Hostname/IP doesn't match certificate's altnames: "Host: registry.npmjs.org. 
is not in the cert's altnames: DNS:a.sni.fastly.net, DNS:a.sni.global- 
ssl.fastly.net"    
18 verbose exit [ 1, true ]    

0 个答案:

没有答案