[v6] Module parse failed: Unexpected character '#' when using Create-React-App
See original GitHub issueBefore you start - checklist
- I followed instructions in documentation written for my React-PDF version
- I have checked if this bug is not already reported
- I have checked if an issue is not listed in Known issues
- If I have a problem with PDF rendering, I checked if my PDF renders properly in PDF.js demo
Description
Our team is waiting for a new version of react-pdf with a new build of pdfjs-dist, which has a fix for Hebrew, so for the test, we tried to install the 6th version of react-pdf but after installation we got the following error
Steps to reproduce
install react-pdf 16 or 17 react-scripts: 3.4.4 implement react-pdf@v6.0.0-beta.3
Expected behavior
Actual behavior
./node_modules/pdfjs-dist/build/pdf.js 1390:17
Module parse failed: Unexpected character '#' (1390:17)
File was processed with these loaders:
* ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
|
| class PDFDocumentLoadingTask {
> static #docId = 0;
|
| constructor() {
Additional information
how can we solve this problem? Thank you
Environment
- Browser (if applicable): chrome
- React-PDF version: 6
- React version: 17
- react-scripts: 3.4.4
Issue Analytics
- State:
- Created a year ago
- Comments:19 (4 by maintainers)
Top Results From Across the Web
React Module parse failed: Unexpected character '@'
I write the webpack.config.dev.js file like below: ... fallback: 'style-loader', use: [ // "postcss" loader applies autoprefixer to our CSS.
Read more >[Solved]-Module parse failed: Unexpected character '@' when ...
Coding example for the question Module parse failed: Unexpected character '@' when using React on Rails with Antd.-Reactjs.
Read more >039;t build with webpack - Material Design for Bootstrap
css 1:0 Module parse failed: Unexpected character '@' (1:0) You may need an appropriate loader to handle this file type, currently no loaders...
Read more >webpack/webpack - Gitter
I'm using module federation and promised based dynamic remotes (https://webpack.js.org/concepts/module-federation/#promise-based-dynamic-remotes). Everything is ...
Read more >Troubleshooting | React Navigation
If the module points to an npm package (i.e. the name of the module doesn't with ./ ), then it's probably due to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Legacy builds were dropped in #988. One of the main reasons was that this made the code insanely big and this kept crashing people’s machines due to out of memory errors.
Another data point; I’m seeing this with: