-
-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
peer dependency for pdfjs-dist #461
Comments
it's better to add the PDF.js package to your NodeModule. |
Well, but I don't need PDF.js, it kinda pollutes my package.json if every package does this. |
Yes, some of the packages generates this "peerDependencies" |
I would like to raise this issue as well. We were seeing an issue in https://github.com/mgechev/ngcc-validation/pull/220 in the situation where there was an additional package with a peer dependency on Note that it is strange to list a package both as dependency and as peer dependency, as the former will cause the requested version to be installed, whereas the latter is just a signal to library consumers to let people know they need to include the peer dependency as a dependency of their own. For libraries, it is typically considered best practice to mark dependencies as peer dependency, as it avoids ending up with multiple versions of the some package "A" if there's other packages that depend on "A". Note, however, that removing the direct dependency would be a breaking change, as library consumers would suddenly be responsible for listing the dependency in their own |
this causes an issue in Angular9 now Because ngcc can't figure out which package it should use. We should just keep one.
To fix above issue, remove pdfjs-dist in your package.json |
ng2-pdf-viewer/package.json
Line 37 in 528043d
Since pdfjs-dist is in the dependency already. Do we still need it in peerDependency?
The text was updated successfully, but these errors were encountered: