react-pdf-js icon indicating copy to clipboard operation
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

Open Ar-mane opened this issue 3 years ago • 3 comments

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

Ar-mane avatar Jul 29 '22 16:07 Ar-mane

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

travisanderson avatar Aug 10 '22 22:08 travisanderson

Also, you can see netlify shows failing since July 8. Can someone at least give an update that it's being looked at?

travisanderson avatar Aug 10 '22 22:08 travisanderson

I have a similaire problem in a @plone/volto project

jimbiscuit avatar Aug 11 '22 12:08 jimbiscuit

@mikecousins Can you please have a look at this?

emmmarosewalker avatar Aug 15 '22 03:08 emmmarosewalker

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...

mikecousins avatar Aug 15 '22 04:08 mikecousins

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!

travisanderson avatar Aug 19 '22 05:08 travisanderson

Latest should be 5.5.1.

mikecousins avatar Aug 22 '22 22:08 mikecousins

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.

travisanderson avatar Aug 23 '22 21:08 travisanderson

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.

mikecousins avatar Aug 23 '22 22:08 mikecousins

I just put out a new version as well. Let me know what you think.

mikecousins avatar Sep 16 '22 04:09 mikecousins