【发布时间】:2018-06-01 18:40:59
【问题描述】:
我正在尝试在我的 ubuntu 16.04 上安装电子,我已经有一个工作的 nodejs 和 npm。但突然我无法按类型安装模块: sudo npm install electron
以下是收到的回复:
npm WARN registry Unexpected warning for https://registry.npmjs.org/:
Miscellaneous Warning EAI_AGAIN: request to
https://registry.npmjs.org/electron failed, reason: getaddrinfo
EAI_AGAIN registry.npmjs.org:443
npm WARN registry Using stale package data from
https://registry.npmjs.org/ due to a request error during
revalidation.
> electron@1.7.10 postinstall
/home/arthur/Documents/Programming/Electron/node_modules/electron
> node install.js
`/home/arthur/Documents/Programming/Electron/node_modules/electron/
install.js:48
抛出错误 ^
Error: read ECONNRESET
at _errnoException (util.js:1024:11)
at TLSWrap.onread (net.js:615:25)
npm WARN y@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron@1.7.10 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron@1.7.10 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely
additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/arthur/.npm/_logs/2017-12-19T10_25_52_312Z-
debug.log
【问题讨论】:
-
您是否已经成功使用
npm install安装软件包或者这是第一次尝试? -
是的,最初我能够做到,直到现在。
-
你使用的 npm 版本是什么?
-
我正在使用 npm 版本 8.9.1。无论如何,从我的配置中删除我的代理和 http-proxy 是有效的。它现在工作正常
-
感谢您的努力。
标签: node.js electron npm-install