facebook / create-react-app

Set up a modern web app by running one command.
https://create-react-app.dev
MIT License
102.76k stars 26.86k forks source link

ERROR Failed to compile with 1 errors 17:18:17 error in ./node_modules/react-pdf/node_modules/pdfjs-dist/build/pdf.js #13038

Open tungphien opened 1 year ago

tungphien commented 1 year ago

The pdfPreview.tsx, I follow code is: https://codesandbox.io/s/react-pdf-v6-itjfzl?file=/src/App.js But see this error. Any help?

ERROR Failed to compile with 1 errors 17:18:17 error in ./node_modules/react-pdf/node_modules/pdfjs-dist/build/pdf.js

Module parse failed: Unexpected character '#' (1413:9) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders | | class PDFDocumentLoadingTask {

static #docId = 0; | | constructor() {

@ ./node_modules/react-pdf/dist/esm/entry.js 1:0-46 7:0-25 8:0-42 @ ./src/pages/POS/SaleOrders/online/pdfPreview.tsx @ ./src/pages/POS/SaleOrders/index.tsx @ ./src/pages/.umi/router.js @ ./src/pages/.umi/umi.js @ multi ./node_modules/af-webpack/lib/webpackHotDevClient.js ./src/pages/.umi/umi.js

dribble-njr commented 8 months ago

same error