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.
Fixes npm WARN npm npm WARN npm npm does not support Node.js v10. This version of npm supports node 12 and higher
node --version
npm --versionnode --versionnpm --versionnpm WARN npm npm WARN npm npm does not support Node.js v10. This version of npm supports node 12 and higher
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.