今天 npm 上發個包,結果報錯 E426。
npm ERR! code E426 npm ERR! 426 Upgrade Required - PUT http://registry.npmjs.org/formats_date npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Administrator\AppData\Local\npm-cache\_logs\2021-11-25T06_55_02_155Z-debug.log error Command failed with exit code 1.
npm 升級 到 TLS1.2,不接受 TLS 1.1\1.0了。
各種嘗試還是報錯,各種搜索終於找到原因了,修改鏡像的時候需要使用 https
npm config set registry=https://registry.npmjs.org