Skip to content
Errors
Commands
Flags
Config
Cheat sheets
Changes
Compat
Codes
Compare
Glossary
Search
Ctrl K
Browse
Error Messages
Commands
Flags & Options
Config Reference
Cheat Sheets
Version Changes
Compatibility
Codes & Tables
X vs Y
Glossary
All tools
Home
Tools
npm
Runtimes & package managers
npm
The default Node.js package manager and registry client.
Official documentation
Errors
1
Commands
1
Flags
1
Cheat sheets
1
Compare
1
Glossary
1
npm ERR! code ERESOLVE: unable to resolve dependency tree
npm fails with ERESOLVE when a package's peer dependency conflicts with the version you install. Read Found and Could not resolve, then align the versions.
All npm error messages
npm install a specific version: npm install package@version
Install an exact version with npm install package@1.2.3, a range with package@^1.2, or a dist-tag with package@next. List published versions with npm view.
All npm commands
npm install --legacy-peer-deps: what it does and when to use it
--legacy-peer-deps makes npm skip installing and checking peer dependencies, as npm 6 did, so ERESOLVE conflicts no longer stop the install. Risks and fixes.
All npm flags & options
npm cheat sheet: install, run, update, publish
npm cheat sheet: init, install and uninstall, version specifiers, scripts, outdated and update, npm ci for CI, ls and explain, config and cache commands.
All npm cheat sheets
npm ci vs npm install: differences and when to use each
npm ci installs exactly what package-lock.json says, deletes node_modules first and never edits the lockfile; npm install resolves ranges and may update it.
All npm x vs y
What is a peer dependency in npm?
A peer dependency is a package a library expects the host project to provide, like react for react-dom. npm 7+ installs peers automatically and checks ranges.
All npm glossary
Esc