[Bug]: ERROR in ./node_modules/pdfjs-dist/build/pdf.mjs 402:14 Loader files .mjs #18498
Unanswered
GuiSandoval
asked this question in
Q&A
Replies: 4 comments 1 reply
-
Is there any solution to this? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I managed to solve the problem by updating my webpack version to 5.93.0. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Any other solution for this problem? It is not feasible to update the webpack version here |
Beta Was this translation helpful? Give feedback.
1 reply
-
maybe its because node version , try to upgrade to >16 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Attach (recommended) or Link to PDF file
In the new version of pdfjs-dist (4.4.168), the project is not running in React.
Previously, I used version 3.6.172, and it worked, but I need the updated library.
Web browser and its version
React 16.9.0 / node v12.18.4 / webpack 4.41.2 / babel-loader 8.1.0
Operating system and its version
linux/windows
PDF.js version
4.4.168
Is the bug present in the latest PDF.js version?
Yes
Is a browser extension
No
Steps to reproduce the problem
1 - install pdfjs-dist
2 - execute command
webpack-dev-server --watch --port 4000 --progress --colors --open --mode development
What is the expected behavior?
project running
What went wrong?
Link to a viewer
No response
Additional context
The solution that almost worked was adding the Babel loader for .mjs files. The project runs, but when accessing the site in the browser, the following error appears:
Beta Was this translation helpful? Give feedback.
All reactions