3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【npmエラー】This is a problem related to network connectivity.

Posted at

状況

ドキュメント通りにLaravelの環境構築をしていたとき

Dockerでnpm installする際、下記のエラー

% docker-compose exec [service名] npm install

npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! network Socket timeout
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-03-24T03_41_00_548Z-debug-0.log

原因

ネット回線が弱すぎたのをproxyエラーだと診断された可能性

解決方法

通信環境がいい場所で再度実行

同じエラー文でググったときに違うアプローチで解決する方法が多かったため、
こんなケースもあるよということがまれだとは思うが参考になれば…

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?