npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

NPM doesn't find peer dependency from global package

I have the same problem as: npm not recognizing global package

Globally installed packages that require peerDependencies don’t see the needed packages, neither installing them locally or globally, and keep reporting the missing peer dependencies.

Also when i try npm list -g, the peer dependencies that I tried to install globally are reported as extraneous.

How can we solve the problem and get them recognised?

I don’t think peerDependencies work with global packages. The peerDependencies are within a package, and global packages are effectively independent.

Do you have a specific peer dependency you would like advice on, or are eslint and babel-eslint good enough examples for your situation?

Those are good examples.
In my case there was also GraphQL.