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
Very high memory usage compiling mozilla/PDF.js #10875
Comments
Hey @artisb45! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly. If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite." |
I just realise I commented underneath the wrong issue. I have patched the file described in the PR, but this doenst fix the memory error for me. FYI, however, by deleting the sourcemaps from the pdfjs-dist package i can get CRA to run again. |
Update: The issue is not fixed since I misidentified the memory bottleneck. For CRA users, you can remove the source maps from the Babel 7.6.4 works because |
Thnx for the quick response @JLHwung. Hopefully I can test the patch out later today. |
Huzzah 🎉 it has been fixed for me. thnx again. |
Bug Report
Current Behavior
When running npm start or npm run build, while pdf.js is used in create-react-app project, memory usage seems to skyrocket to unreasonable amounts and fail with "JavaScript heap out of memory" error.
I've reported it to PDF.js guys, and they found that ejecting and downgrading babel from 7.7.0+ to 7.6.4 seems to fix the issue so they think it must be regression issue with Babel. The issue can be reproduced in any fresh create-react-app (version 3.3.0) project with pdfjs-dist installed. (link to original issue)
Steps to reproduce the problem
Input Code
Example repo
Expected behavior/code
npm start or npm run build succesfully without unreasonable memory usage
Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)
No additional configuration except of what CRA gives us
Environment
The text was updated successfully, but these errors were encountered: