0
0

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.

Ubuntuでnpm installしたいけど'Socket connection timeout'になった時

Last updated at Posted at 2023-06-20

エラー

coc.nvimでLSPをインストールしようとすると

✗ coc-jedi Socket connection timeout↴

bashからのnpm installも以下の状態から一向に進まない

$ npm install yarn
(⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠧ idealTree:sunaubuntu: sill idealTree buildDeps

対応策

IPv6を無効化する

以下の記事を参考にIPv6を無効化

sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1

これで:CocInstall$ npm installも無事ネットワークに繋がるようになった

まとめ

IPv6との相性が悪いらしく、npm ipv6とかで調べると意外と同じようなエラーで困っている人がいる
エラー解消のきっかけになれば幸いです

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?