426 Upgrade Required error was reported after NPM publish.

An error log:

38 error code E426
39 error 426 Upgrade Required - PUT http://registry.npmjs.org/vite-aei/-rev/3-fbe7d788fabb250e2281e39b1fc7f166
40 verbose exit 1
Copy the code

After some searching, the cause of the error was found: after 4 October 2021, the NPM website and NPM Registry must use TLS Secure Socket Layer 1.2, so the corresponding version needs to be upgraded.

The solutions are as follows:

NPM install -g https://tls-test.npmjs.com/tls-test-1.0.0.tgz NPM config set registry at https://registry.npmjs.orgCopy the code

Note that the repository address in step 2 starts with HTTPS. If you can’t remember what it was before, you’d better execute the second line of code.