![](/img/trans.png)
[英]Windows 10 with early build npm fails to install any modules due to 'bad signature'
[英]npm install fails with bad signature error on Windows
我正在使用 nvm 來管理我的節點版本。 我有一個用戶節點 6.10.2 的項目。 使用像npm install -g gulp
這樣簡單的東西,我得到以下錯誤:
write EPROTO 101057795:error:1408D07B:SSL routines:ssl3_get_key_exchange:bad signature:openssl\ssl\s3_clnt.c:20
我已將 strict-ssl false 添加到我的配置中,但沒有幫助。 我不在代理后面,我已經在我的公司防火牆、home.network 甚至我的移動熱點后面嘗試過,都出現了同樣的錯誤。 我更改為使用 http:// 而不是 https:// 使用npm config set registry http://registry.npmjs.org/
這讓我過去了 gulp 錯誤但隨后與其他包錯誤返回(大概是因為他們拉來自不同的注冊表)。 無論如何,使用 http:// 讓我擔心安全問題。
我在節點 6.10.2 和 7.4.0 上得到了相同的結果。 如果我跳轉到最新的節點,12.18.0 不會發生錯誤,但我正在處理的項目不支持新的節點版本。 不知道還能嘗試什么。
這是 npm-debug.log 文件的錯誤部分:
103 verbose stack Error: write EPROTO 101057795:error:1408D07B:SSL routines:ssl3_get_key_exchange:bad signature:openssl\ssl\s3_clnt.c:2032:
103 verbose stack
103 verbose stack at exports._errnoException (util.js:1018:11)
103 verbose stack at WriteWrap.afterWrite (net.js:804:14)
104 verbose cwd C:\code\extraspace.web.pointofsale
105 error Windows_NT 10.0.18363
106 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "gulp"
107 error node v6.10.2
108 error npm v3.10.10
109 error code EPROTO
110 error errno EPROTO
111 error syscall write
112 error write EPROTO 101057795:error:1408D07B:SSL routines:ssl3_get_key_exchange:bad signature:openssl\ssl\s3_clnt.c:2032:
@sledguy,當我將 bower install 命令放入 cmd 時,我遇到了類似的異常,為了解決它,我在 .bowerrc 文件中添加了 { "registry": "https://registry.bower.io"} ,仍然發生同樣的錯誤, and after changing the https://registry.bower.io to http://registry.bower.io , the error was solved.
免責聲明: Nodejs 經驗不足,我給出的答案是我自己對這個問題的研究,希望能在某種程度上幫助你。
參考: write-eproto-101057795...或common-proxy-and-networking-p...
首先檢查Nodejs是否正確安裝
- Open Command Prompt (Windows) or Terminal (Mac) or Bash (Linux)
- Execute this command: node -v (The output should be "6.10.2")
- Execute this command: npm -v (The output should be "(some-version)")
嘗試這個:
- Open Command Prompt (Windows) or Terminal (Mac) or Bash (Linux)
- Go to the "app" folder (Located on the same folder of this file)
- Execute this command (*): npm install --development
- Execute this command: npm start --development
如果以上所有方法都失敗了,請檢查下面的列表。
從你的錯誤日志
...
...
107 error node v6.10.2
108 error npm v3.10.10
...
...
您的 npm 和 nodejs 版本很舊。 嘗試升級 npm 和 nodejs 版本。
也試試
//disable strict ssl checking
npm config set strict-ssl false
//if you're using different npm registry try official registry for debug
npm config set registry https://registry.npmjs.org/
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.