-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
pdfjs-dist npm update from 2.0.489 to 2.0.943 causes webpack error: Can't resolve 'babel-runtime/regenerator' #10280
Comments
Coincidentally, version 2.0.550 works fine and does not give webpack build errors. |
I think this is because |
@timvandermeij Babel 6 or 7, doesn't really matter. If your code |
None of this will be a problem if you actually use the pre-built library; please see the files distributed in https://github.com/mozilla/pdfjs-dist/tree/master/build respectively in https://github.com/mozilla/pdfjs-dist/tree/master/web, which are officially supported and won't suffer from the issues described here. |
Ah, I see. I was importing PDFLinkService which does not belong to the main lib. Thanks a bunch! |
I'm a little confused. The versions at https://github.com/mozilla/pdfjs-dist/tree/master/build and https://github.com/mozilla/pdfjs-dist/tree/master/web are still version 2.0.489 at the time of this writing and this version is devoid from the issue I was reporting here. Assuming @Snuffleupagus means that we should be using the pdfjs-dist version over pdfjs then I'm confused even more because the npm package for pdfjs-dist is at version 2.0.943 which has the issue (see https://www.npmjs.com/package/pdfjs-dist) We are needing to pin the pdfjs-dist npm package at "2.0.550" as anything more recent breaks. Am I missing something? |
See https://github.com/mozilla/pdfjs-dist/releases for the latest version, the other problem described here (non-updating
That's not what #10280 (comment) implies; rather it just points out that if you are using https://github.com/mozilla/pdfjs-dist, then you should (in general) use the files found in the |
That actually helps. Thanks for clearing up. |
After updating our npm package for pdfjs-dist from 2.0.489 to 2.0.943, webpack fails to build.
If we downgrade back to version 2.0.489 all is well again and the errors go away.
Here's a copy of the webpack build log showing the failures:
Configuration:
What is the expected behavior? (add screenshot)
For the webpack build to succeed.
What went wrong? (add screenshot)
The webpack build fails, citing errors in the pdfjs-dist npm package for:
Module not found: Error: Can't resolve 'babel-runtime/regenerator'
Package.json excerpt follows:
The text was updated successfully, but these errors were encountered: