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

Package not compatible with Vue cli version 5.x #363

Open
dvago opened this issue Feb 23, 2022 · 15 comments
Open

Package not compatible with Vue cli version 5.x #363

dvago opened this issue Feb 23, 2022 · 15 comments

Comments

@dvago
Copy link

dvago commented Feb 23, 2022

The newer version of vue-cli 5.x migrates from webpack 4 to webpack 5, the newer version of webpack does change the support for web workers.

So, the latest version of vue-pdf throws the following error:

ERROR in ./node_modules/pdfjs-dist/es5/build/pdf.worker.js (./node_modules/vue-pdf/node_modules/worker-loader/dist/cjs.js!./node_modules/pdfjs-dist/es5/build/pdf.worker.js)

Module build failed (from ./node_modules/vue-pdf/node_modules/worker-loader/dist/cjs.js):
Error: MainTemplate.hooks.hotBootstrap has been removed (use your own RuntimeModule instead)

Would you please update this package to make it run with vue-cli 5?

@liu-guo-jing
Copy link

same problem as you, do I have to downgrade to VUE-CLI4.0

@YSoli
Copy link

YSoli commented Apr 2, 2022

Same issue here while migrating to vue-cli 5.x

@kstraszewski
Copy link

Same here

image

@xuxusheng
Copy link

same +1

@EugeneKuzmin
Copy link

+1

@Glandos
Copy link

Glandos commented Apr 13, 2022

This is strange. I don't know what I did, but it works for me.
However, it uses worker-loader which outputs DEP_WEBPACK_COMPILATION_CACHE and DEP_WEBPACK_DEPRECATION_ARRAY_TO_SET_INDEXER with Webpack 5 brought by vue-cli 5.

@Byteschmiede
Copy link

same +1

@dvago
Copy link
Author

dvago commented Apr 21, 2022

@liugj101 I ended up forking the project, cleaning up the code and make it work for vue-cli 5, this vue-pdf project is clearly dead, it's pretty pointless waiting for any maintainer doing anything.

@cwilby
Copy link

cwilby commented Apr 29, 2022

@dvago Are you able to share those changes, or was only a catch call needed? https://github.com/dvago/vue-pdf

@dvago
Copy link
Author

dvago commented Apr 29, 2022

Not really, I created a package within my company git account and stripped out lots of features that we don't use to run it as simple as possible, so the package is not called vue-pdf anymore and it's not public.

I don't think it makes sense for me to publish a clone of it as I'm not going to be able to maintain it or keep up with the eventual broad public requests to be fair, hope that makes sense.

@MoNaiZi
Copy link

MoNaiZi commented May 16, 2022

same +1

@cwilby
Copy link

cwilby commented May 16, 2022

@MoNaiZi This package works well - https://github.com/hrynko/vue-pdf-embed

@chenweigh
Copy link

+1
ERROR in ./node_modules/pdfjs-dist/es5/build/pdf.worker.js (./node_modules/vue-pdf/node_modules/worker-loader/dist/cjs.js!./node_modules/pdfjs-dist/es5/build/pdf.worker.js)

@ziyang314
Copy link

+1

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

13 participants