This warning indicates your Node.js version is too old for the installed npm version. npm evolves to require newer Node.js versions, and Node.js v10 reached end-of-life in April 2021.
npm has minimum Node.js version requirements that increase over time as Node.js versions reach end-of-life. When your Node.js version is too old, npm may work but with degraded functionality, bugs, or security vulnerabilities. Node.js v10 reached end-of-life on April 30, 2021. Modern npm versions require Node.js 14 or higher, with npm v10 requiring Node.js 18+.
Identify what you have:
node --version
npm --versionNode v10.x or lower needs upgrading. Current LTS versions are Node 18 (npm 9) and Node 20 (npm 10).
Use Node Version Manager for easy version management:
# Install nvm (Linux/macOS)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
# Reload shell config
source ~/.bashrc
# or
source ~/.zshrc
# Install latest LTS
nvm install --lts
nvm use --lts
# Verify
node --version
npm --versionfnm is a faster, Rust-based alternative to nvm:
# Install fnm
curl -fsSL https://fnm.vercel.app/install | bash
# Install latest LTS
fnm install --lts
fnm use lts
# Verify
node --version
npm --versionCreate .nvmrc file for your project:
echo "20" > .nvmrcTeam members then run:
nvm use
# Automatically switches to Node 20fnm does this automatically when entering the directory.
Update your CI configuration:
# GitHub Actions
- uses: actions/setup-node@v4
with:
node-version: '20'
# Or read from .nvmrc
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'If using Docker, update your base image:
# Old
FROM node:10-alpine
# New
FROM node:20-alpineRebuild your images after changing.
Node.js/npm version compatibility:
- Node 14: npm 6.14+ to 8.x
- Node 16: npm 7.x to 8.x
- Node 18: npm 8.0+ (LTS until April 2025)
- Node 20: npm 9.0+ (LTS until April 2026)
- Node 22: npm 10.x
Always use LTS (Long Term Support) versions for production. Even-numbered Node versions (18, 20, 22) receive LTS status.
Using nvm or fnm avoids system-wide permission issues and makes version switching seamless between projects.
npm notice access token expired or revoked. Please try logging in again.
Token has expired - npm authentication failure
npm ERR! code EAI_AGAIN
How to fix "EAI_AGAIN" in npm
npm error code E403 npm error 403 Forbidden - PUT https://registry.npmjs.org/<package>
How to fix 'E403 Forbidden' error in npm
npm ERR! code EUSAGE npm ERR! Usage error
How to fix "npm ERR! code EUSAGE" in Node.js projects
npm ERR! code E401 npm ERR! 401 Unauthorized
How to fix "E401 Unauthorized" in npm