过了个国庆,发布个npm包,突然就发不了了 ,报出下面的错,虽然有链接,但是没法打开。
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/
在stackoverflow上找到解决方法,特此记录
把
npm config set registry=http://registry.npmjs.org
这个改成
npm config set registry=https://registry.npmjs.org
就好了,就是把http
改成https
就可以了。