What does ` UNMET PEER DEPENDENCY <packageName> extraneous` mean?

Viewed 21785

I understand that UNMET PEER DEPENDENCY means I need to npm install one of my peerDependencies. I believe that extraneous means the package exists but is not listed in package.json (presumably because it's installed globally?).

What does it mean to have the two of them together?

And why am I seeing this error even though I see these packages in node_modules, at the correct versions?

1 Answers

It means that you have a module installed in your local npm repo that is "extraneous" (meaning you have no dependency on it) that has an "unmet peer dependency" on a library you also do not have installed (or if you do have it installed locally or globally, it is also extraneous so it's not in your dependency tree). If you run npm prune it should remove the extraneous dependency and this message.

Related