2017-12-19 48 views
1

私はubuntu 16.04に電子をインストールしようとしています。すでにnodejsとnpmが動作しています。しかし、突然、私はタイプによってモジュールをインストールすることができません: sudoのNPMインストール電子以下 npmから電子をインストールできません

が応答が取得していますされています

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. 

> [email protected] 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 [email protected] No repository field. 

npm ERR! code ELIFECYCLE 
npm ERR! errno 1 
npm ERR! [email protected] postinstall: `node install.js` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] 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 
+0

は、すでに 'NPMのinstall'を使用してパッケージをインストールすることに成功したか、それは最初の試みであることがありますか? – edkeveked

+0

はい、当初私は今までできました。 – artie

+0

使用しているnpmのバージョンは何ですか? – edkeveked

答えて

2

誤りますプロキシ設定。このanswerに基づいて、以下を試すことができます。

まず、あなたの初期設定が存在する場合は削除しよう:

npm config rm proxy 
npm config rm https-proxy 

そして、必要に応じて、必要に応じて、プロキシの設定のために働いプロキシとHTTPSプロキシを削除

npm config set proxy proxy-url 
npm config set https-proxy proxy-url 
+0

をupvotedとhttpsプロキシのURLできるだけ一般的にとどまるように – artie

+0

@ArthurKalikitiを上記の答えは、プロキシを設定しなくても動作しますあなたの答え – edkeveked

0

を設定しよう私の場合は、同様の状況の別の人がいる場合に備えて。 は自分の端末に次のように入力します

npm config rm proxy 
npm config rm https-proxy 
関連する問題