FranckFreiburger / vue-pdf

vue.js pdf viewer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error pdfjs-dist version

dngwoodo opened this issue · comments

commented

In 1a47de9 commit, you changed the pdfjs-dist version to less than 2.8.0, but download the vue-pdf 4.2.0 version from npm, it will be downloaded to 2.8.335 version as shown in the screenshot. The current workaround is to install npm install pdfjs-dist@2.5.207

vue-pdf version: 4.2.0
vue-cli: 4.4.4

The commit content has not yet been applied when downloading.

스크린샷 2021-06-16 오후 12 45 17
스크린샷 2021-06-16 오후 12 48 39

[INFO] warning "vue-pdf > pdfjs-dist@2.8.335" has incorrect peer dependency "worker-loader@^3.0.7".
[INFO] warning "vue-pdf > raw-loader@4.0.2" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
[INFO] warning "vue-pdf > worker-loader@2.0.0" has unmet peer dependency "webpack@^3.0.0 || ^4.0.0-alpha.0 || ^4.0.0".

the same problem

Exists another issue with the palliative solution (#315 (comment)). You can use this for solved your problem now.

On this commit (1a47de9) the solution is reported and merged (#313). But necessary to await a new release with this correction entry in the npm package.

My solution:

add to your package.json pdfdist with the right version, like this :

  "dependencies": {
    "pdfjs-dist": "2.7.570",
    ...
    }

delete your node_modules and lock file and run build again.

stick to pdfjs-dist@2.6.347 since 2.7.570 drops 'support for IE 11 and non-Chromium-based Edge'

stick to pdfjs-dist@2.6.347 since 2.7.570 drops 'support for IE 11 and non-Chromium-based Edge'

Does it really make sense though? These browsers are antiquated and their support should be dropped anyway. Instead of holding the whole vue-pdf lib back, why not package a last version that supports them, talk about it and then move forward with a new major version?
It's a choice between everyone having to pin the pdfjs-dist version (the current choice) or only a few people having to pin the vue-pdf version.

@FranckFreiburger pls bump new release v4.2.1 to fix npm install. Week ago i forget this and install pdfvuer instead =)