ProjectStack
npm

npm WARN: peer dep missing

A package you installed expects another package to be present as a peer dependency, but it wasn't found. Your code may still work, but some features of the package might break.

Common causes

  • You installed a plugin or extension without its required host package
  • The required peer dependency is installed but at a version outside the accepted range
  • You're using npm 6 which doesn't auto-install peer deps (npm 7+ does)
  • A transitive dependency has a peer requirement that your project doesn't satisfy

How to fix it

  1. Install the missing peer dependency manually: npm install <missing-package>
  2. Install a specific version if needed: npm install <package>@<version>
  3. Check what peer deps a package requires: npm info <package> peerDependencies
  4. If it's just a warning and everything works, you can often ignore it

Example

npm WARN peer dep missing: react@>=16.8.0, required by [email protected]

Installing a React hooks library without having React installed in the project

Have a different error?

Paste any error message into the Error Translator to get an instant explanation.