![](/img/trans.png)
[英]node.js elasticsearch self signed certificate in certificate chain
[英]Node.js dependency installation giving "self signed certificate in certificate chain"
我正在嘗試安裝依賴項ursa
包。 但我收到此錯誤:
self signed certificate in certificate chain
關於如何解決這個問題的任何想法?
我已經設置了正確的代理設置,並且能夠下載“node-horseman”依賴項。
任何輸入將不勝感激。 提前致謝。
>node --version
v6.9.1
>npm install ursa
...\node_modules\ursa>if not defined npm_config_node_gyp (node "C:\Users
\xxxxxxxxxxx\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: self signed certificate in certificate chain
gyp ERR! stack at Error (native)
gyp ERR! stack at TLSSocket.<anonymous> (_tls_wrap.js:1062:38)
gyp ERR! stack at emitNone (events.js:86:13)
gyp ERR! stack at TLSSocket.emit (events.js:185:7)
gyp ERR! stack at TLSSocket._finishInit (_tls_wrap.js:586:8)
gyp ERR! stack at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:416:38)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\\\software\\node.exe" "C:\\Users\\xxxxxxxxxxx\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\xxxxxxxxxxx\git\source_code_\ursa
gyp ERR! node -v v6.9.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN MobPhantom@1.0.0 No description
npm WARN MobPhantom@1.0.0 No repository field.
此問題的解決方法是將以下設置為環境變量,
NODE_TLS_REJECT_UNAUTHORIZED = 0
謝謝。
嘗試先卸載 Angular/cli 並安裝 node-gyp,然后嘗試重新安裝 Angular cli
npm uninstall -g @angular/cli
npm install -g node-gyp
npm install -g @angular/cli
它工作得很好
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.