NPM doesn't find peer dependency from global package

(Igor Pellegrini) #1

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?

0 Likes

(John Gee) #2

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?

0 Likes

(Igor Pellegrini) #3

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

0 Likes

(system) closed #4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

0 Likes