How to fix npm ERR! 426 Upgrade Required in npm
The HTTP 426 Upgrade Required error occurs when the npm registry requires a different protocol version. This usually indicates the need to update npm or Node.js to support newer registry features.
Quick fix
Fixes npm ERR! 426 Upgrade Required
node --version
npm --version- Check npm and Node.js versions
- Update npm
- Update Node.js
- Check TLS version support
node --versionnpm --versionnpm ERR! 426 Upgrade Required
What this error means
HTTP 426 indicates the server refuses to process the request using the current protocol and requires the client to upgrade. In npm's context, this typically means your npm version is too old and doesn't support the current registry protocol or security requirements. This error has become more common as npm has tightened security requirements, particularly around TLS versions and authentication methods.
Typical symptoms
- npm install fails with 426 error
- Error started without changing anything
- Old Node.js/npm version in use
- CI/CD suddenly failing
- Works on newer machines but not older
- Error mentions protocol or TLS
Common causes
- npm version too old
- Node.js version deprecated
- TLS 1.0/1.1 no longer supported
- Old authentication protocol
- Registry API version change
- Operating system too old for newer TLS
- Proxy/firewall blocking protocol upgrade
How to fix "npm ERR! 426 Upgrade Required"
Verify your versions:
node --version
npm --versionCompare with current LTS versions at nodejs.org.
Upgrade to latest npm:
# Update npm globally
npm install -g npm@latest
# Or use npx
npx npm@latest installInstall a supported Node.js version:
# Using nvm
nvm install --lts
nvm use --lts
# Or download from nodejs.org
# Or use your OS package manager
sudo apt update && sudo apt install nodejsVerify TLS 1.2+ support:
node -e "console.log(process.versions.openssl)"
# Test TLS connection
openssl s_client -connect registry.npmjs.org:443 -tls1_2For pipeline failures:
# GitHub Actions example
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: "20" # Use current LTSEnsure network allows modern protocols:
1. Contact IT about TLS 1.2/1.3 support
2. Check if proxy allows HTTPS properly
3. Verify firewall isn't downgrading connections
Advanced notes
npm registry deprecated TLS 1.0/1.1 in 2019. Ensure your infrastructure supports TLS 1.2 at minimum. For Docker images, use node:lts or node:20 instead of old versions. In enterprise environments, coordinate with security team about TLS policies. Some older operating systems (Windows 7, older macOS) may need updates to support modern TLS.
Frequently asked questions
- What does "npm ERR! 426 Upgrade Required" mean?
- HTTP 426 indicates the server refuses to process the request using the current protocol and requires the client to upgrade. In npm's context, this typically means your npm version is too old and doesn't support the current registry protocol or security requirements. This error has become more common as npm has tightened security requirements, particularly around TLS versions and authentication methods.
- How do I fix "npm ERR! 426 Upgrade Required"?
- The HTTP 426 Upgrade Required error occurs when the npm registry requires a different protocol version. This usually indicates the need to update npm or Node.js to support newer registry features.
- What causes "npm ERR! 426 Upgrade Required"?
- npm version too old Node.js version deprecated TLS 1.0/1.1 no longer supported
- Is the "npm ERR! 426 Upgrade Required" error serious?
- Yes. This is a high-severity error that usually blocks work until it is fixed, but the steps above resolve it.
Official resources & further reading
- ๐npm Official Documentation
- ๐
- ๐