NodeJS npmはインターネットにアクセスできません。数分間停止した後のエラーコード ETIMEDOUT

NodeJS npmはインターネットにアクセスできません。数分間停止した後のエラーコード ETIMEDOUT

Nodejsプロジェクト用のモジュールをインストールしようとしています。実行しましたが、npm i何らかの理由で認識モジュールを追加したときに表示される進行状況バーが停止し、数分後にエラーが発生しました。

https://registry.npmjs.org/bcrypt failed, reason: connect ETIMEDOUT 2606:4700:83b3:80e2:e43b:1d:6810:1023:443
65 verbose stack     at ClientRequest.<anonymous> (/usr/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14)
65 verbose stack     at ClientRequest.emit (node:events:512:28)
65 verbose stack     at TLSSocket.socketErrorListener (node:_http_client:495:9)
65 verbose stack     at TLSSocket.emit (node:events:524:35)
65 verbose stack     at emitErrorNT (node:internal/streams/destroy:151:8)
65 verbose stack     at emitErrorCloseNT (node:internal/streams/destroy:116:3)
65 verbose stack     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
66 verbose cwd /home/rick/GoogleSolutions_Project_Backend
67 verbose Linux 5.19.0-35-generic
68 verbose node v19.8.1
69 verbose npm  v9.5.1
70 error code ETIMEDOUT
71 error syscall connect
72 error errno ETIMEDOUT
73 error network request to https://registry.npmjs.org/bcrypt failed, reason: connect ETIMEDOUT 2606:4700:83b3:80e2:e43b:1d:6810:1023:443
74 error network This is a problem related to network connectivity.
74 error network In most cases you are behind a proxy or have bad network settings.
74 error network
74 error network If you are behind a proxy, please make sure that the
74 error network 'proxy' config is set properly.  See: 'npm help config'
75 verbose exit 1
76 timing npm Completed in 3225842ms
77 verbose unfinished npm timer reify 1679241527055
78 verbose unfinished npm timer reify:loadTrees 1679241527057
79 verbose code 1
80 error A complete log of this run can be found in:
80 error     /home/rick/.npm/_logs/2023-03-19T15_58_47_022Z-debug-0.log

グローバルパッケージのインストールを試しましたが、npm i -g bootstrapまだ同じエラーが発生します。

完全なログ:https://pastebin.com/Y2XrJgHR
オペレーティングシステムのバージョン:Ubuntu Jammy 22.04 LTS

ベストアンサー1

おすすめ記事