Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERR! 426 Upgrade Required, when I interact with the npm registry

Tags:

npm

When I try to publish a new package to npm or try to logout, I get the following error message:

npm ERR! code E426
npm ERR! 426 Upgrade Required
like image 650
Robin Wieruch Avatar asked Oct 05 '21 09:10

Robin Wieruch


2 Answers

Beginning October 4, 2021, all connections to npm websites and the npm registry—including for package installation—must use TLS 1.2 or higher.

Source

What I did:

  • upgrade Node (0) to its current recommended version: 14.18.0 LTS
  • upgrade npm with npm install -g npm@latest

Other causes: I had to manually set the registry to use https instead of http as well:

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

(0) When using nvm, that's what you need to do:

nvm install 14.18.0
nvm use 14.18.0
nvm alias default 14.18.0
like image 98
Robin Wieruch Avatar answered Oct 16 '22 19:10

Robin Wieruch


setting npm config set registry https://registry.npmjs.org/ worked for me using npm v8

like image 1
Blaze Clone Avatar answered Oct 16 '22 18:10

Blaze Clone