react-pdf-js
react-pdf-js copied to clipboard
Can you re-build a new version to npm ? we need those last commit in , still can't us it
getting
render-pdf\node_modules\@bundled-es-modules\pdfjs-dist\build\pdf.js:27612
export default pdf_1;
^^^^^^
SyntaxError: Unexpected token 'export'
at Object.compileFunction (node:vm:352:18)
at wrapSafe (node:internal/modules/cjs/loader:1026:15
Just installed into my next.js project, and I get similar error. I just did a yarn add and copy/pasted the example from the readme, and I get SyntaxError: Unexpected token 'export' , and also on 27612
Also, you can see netlify shows failing since July 8. Can someone at least give an update that it's being looked at?
I have a similaire problem in a @plone/volto project
@mikecousins Can you please have a look at this?
Sorry guys, you'll need to keep using the latest published version for now. The package was getting pretty old and needed a bunch of updates and I'm still fighting with the packaging. If anyone wants to take a stab at it feel free. It's a tough update...
Appreciate the update Mike. I’m happy to use whatever version that is you are referring to. How can I do so? All I did was a yarn add, so it should already be the latest published version?
I’d settle for any version that works. Thank you!
Latest should be 5.5.1.
So, not sure if you quite realize that this is the very version that is broken.
Like, I'm simply using yarn add command, which adds 5.5.1 to the package.json file, and then I copy paste the exact README example, and I am getting the error on page load SyntaxError: Unexpected token 'export'
.........so telling people to use the latest published version for now...that doesn't work. Hence the frustration.
Working 5.5.1 sample: https://codesandbox.io/s/cold-mountain-8yq5gb?file=/src/App.tsx
Can you share a reproducible codesandbox of that issue? It seems to work in all of my projects okay.
I just put out a new version as well. Let me know what you think.