見出し画像

npm audit で 「must use TLS 1.2 or higher」というエラーが出たら


【状況】npm audit コマンドを実行したら下記のエラー

npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/
npm ERR! code ENOAUDIT
npm ERR! audit Your configured registry (http://registry.npmjs.org/) may not support audit requests, or the audit endpoint may be temporarily unavailable.
npm ERR! audit The server said: Beginning October 4, 2021, all connections to npm websites and the npm registry - including for package installation - must use HTTPS and TLS 1.2 or higher.
npm ERR! audit
npm ERR! audit For more information see this blog post: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\tomokato\AppData\Roaming\npm-cache\_logs\2021-10-24T01_49_18_080Z-debug.log

【対処】下記のコマンドを実行する(http -> https

npm config set registry https://registry.npmjs.org/

この記事が気に入ったらサポートをしてみませんか?