Skip to content
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

ng2-pdf-viewer dependencies have conflicts with webpack >= 3 #302

Closed
iexela opened this issue Mar 15, 2018 · 1 comment
Closed

ng2-pdf-viewer dependencies have conflicts with webpack >= 3 #302

iexela opened this issue Mar 15, 2018 · 1 comment
Assignees
Milestone

Comments

@iexela
Copy link

iexela commented Mar 15, 2018

Bug Report or Feature Request (mark with an x)
- [ ] Regression (a behavior that used to work and stopped working in a new release)
- [ ] Bug report -> please search issues before submitting
- [x] Feature request
- [ ] Documentation issue or request

When I try to install ng2-pdf-viewer@4.1.2 in the project having webpack@3.10.0 npm logs the following error:

npm WARN worker-loader@0.8.1 requires a peer of webpack@>=0.9 <2 || ^2.1.0-beta || ^2.2.0 but none was installed.

This problem is happened, because

  1. ng2-pdf-viewer depends on pdfjs-dist@1.9.489
  2. pdfjs-dist@1.9.489 has dependency worker-loader@^0.8.0
  3. worker-loader@0.8.1 (which is the latest version till 1.0.0) has the following peer dependency webpack: >=0.9 <2 || ^2.1.0-beta || ^2.2.0

worker-loader supports webpack@3.x.x starting from the version 1.0.0 (commit)
pdfjs-dist supports worker-loader@1.x.x starting from the version 1.10.x (pull request)

Is it possible to update pdfjs-dist to version 1.10.x?

All is much worse when I use npm lock file, because when some constraints are not satisfied lock file is not updated.

npm WARN saveError Problems were encountered
npm WARN saveError Please correct and try again.

I have to use different workaround to keep lock file consistent, when new dependency is added into the project.

Environment:

webpack@3.10.0
@angular/*@5.1.3
ng2-pdf-viewer@4.1.2
@CarlosAyala
Copy link

Same problem here.

@VadimDez VadimDez self-assigned this Apr 15, 2018
VadimDez added a commit that referenced this issue Apr 15, 2018
VadimDez added a commit that referenced this issue Apr 15, 2018
VadimDez added a commit that referenced this issue Apr 16, 2018
VadimDez added a commit that referenced this issue Apr 18, 2018
VadimDez added a commit that referenced this issue Apr 19, 2018
@VadimDez VadimDez added this to the 5.0.0 milestone Apr 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants