I need to build nextjs project with PDFViewer using @react-pdf-viewer, but when collecting page there are some error SyntaxError: Unexpected token '||='
.
The problem is occured from pdf.js in node_modules
, I try to change ||=
to ||
in pdf.js
, and build no error.
But I need to deploy in hosting and need to download pdf.js from yarn install
, some code that I change before will be restored.
How can I solve it?
||=
is a recent addition to the language, what Node version are you using?||=
@react-pdf-viewer