nextJS 13 app Build is failing
Answered
Muhammed Khal posted this in #help-forum
Hai Guys,
My nextjs 13 app build is failing after I use the react-pdf
Getting that type of an error
How can I solve it please help me
My nextjs 13 app build is failing after I use the react-pdf
Failed to compile.
./node_modules/canvas/build/Release/canvas.node
Module parse failed: Unexpected character '�' (1:2)
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
(Source code omitted for this binary file)
Import trace for requested module:
./node_modules/canvas/build/Release/canvas.node
./node_modules/canvas/lib/bindings.js
./node_modules/canvas/index.js
./node_modules/pdfjs-dist/build/pdf.js
./node_modules/react-pdf/dist/esm/pdfjs.js
./node_modules/react-pdf/dist/esm/index.js
./container/agreement/agreement-dropzone.tsx
> Build failed because of webpack errorsGetting that type of an error
How can I solve it please help me
Answered by Eurasian Blackbird
your import trace error was in canvas - it must be a dep of react-pdf
14 Replies
Sure I'll try
Still same @Eurasian Blackbird
Lemme try and I’m not using any canvas in my app
I’m just using the react-pdf
Then after that when I try to build it’s giving me those errors
Eurasian Blackbird
your import trace error was in canvas - it must be a dep of react-pdf
Answer
Yes
I’ll try that one and I’ll let you know now I already shutdown my laptop
Here already mid night. Want to hit the bed
Thanks mate
Eurasian Blackbird
np, hope you fix it 🙂
Thanks it worked @Eurasian Blackbird