# PDF Viewer React sample has error

**URL:** <https://pdfjs.community/t/pdf-viewer-react-sample-has-error/1927>\
**Category:** Bug Reports\
**Created:** [August 10, 2022, 3:43am UTC](https://pdfjs.community/t/pdf-viewer-react-sample-has-error/1927 "2022-08-10T03:43:23Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![shumkapoh](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@shumkapoh](https://pdfjs.community/u/shumkapoh)\
**Post date:** [August 10, 2022, 3:43am UTC](https://pdfjs.community/t/pdf-viewer-react-sample-has-error/1927/1 "2022-08-10T03:43:23Z")

</div>

In the demo, the text select & pan is working fine  
[Demo](https://pdfjs.express/demo?product=viewer)

But in in the React example, the select & pan feature is not working.  
[React](https://github.com/pdfjs-express/pdfjs-express-viewer-react-sample)

And I notice there is this error message whenever I’m performing any click.

 ![Screenshot 2022-08-10 at 11.42.00 AM](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/757374532c9cebe2e330ba6913f60caaf3d91dec.png)

---

<div class="post-metadata">

**Author:** ![dfelix](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@dfelix](https://pdfjs.community/u/dfelix)\
**Post date:** [August 11, 2022, 12:35am UTC](https://pdfjs.community/t/pdf-viewer-react-sample-has-error/1927/3 "2022-08-11T00:35:12Z")

</div>

Hello @shumkapoh

Indeed, I was able to reproduce the issue. This will be fixed in the next version (8.8.0), but in the meantime, as a workaround, could you try the attached folders and let me know if this works for you?

The only thing you need to do is replace the UI and core folders inside public/webviewer/lib with these two ones attached. Please remove the old ones first before pasting the new folders in.

[Archive.zip](https://pdfjs.community/uploads/short-url/9HHBximK0Ra6BbQdQkLEOoXAD1B.zip) (6.9 MB)

---

<div class="post-metadata">

**Author:** ![twidel](https://avatars.discourse-cdn.com/v4/letter/t/ed8c4c/32.png) [@twidel](https://pdfjs.community/u/twidel)\
**Post date:** [December 6, 2022, 4:56pm UTC](https://pdfjs.community/t/pdf-viewer-react-sample-has-error/1927/4 "2022-12-06T16:56:45Z")

</div>

Is there a similar zip file with a fix for the @pdftron/pdfjs-express-viewer version? This zip file seems to be for the @pdftron/pdfjs-express version.

Can you provide a release date for v8.8.0?

---

<div class="post-metadata">

**Author:** ![tgordon](https://avatars.discourse-cdn.com/v4/letter/t/aca169/32.png) [@tgordon](https://pdfjs.community/u/tgordon)\
**Post date:** [December 21, 2022, 7:08pm UTC](https://pdfjs.community/t/pdf-viewer-react-sample-has-error/1927/5 "2022-12-21T19:08:05Z")

</div>

Hi twidel,

Please try this build:  
[PDFJSExpress-view-only-8.7.0.zip](https://pdftron-my.sharepoint.com/:u:/p/tgordon/Efvykhnnp1BFrIz3dRVezWsBdSRp3sMc-wnIHDT_VjN7HQ?e=P5fhQb)

We are no longer releasing new versions of PDFJS Express, and instead are updating v8.7 with bugfixes.

Best regards,  
Tyler Gordon  
Web Development Support Engineer  
PDFTron

---

<div class="post-metadata">

**Author:** ![twidel](https://avatars.discourse-cdn.com/v4/letter/t/ed8c4c/32.png) [@twidel](https://pdfjs.community/u/twidel)\
**Post date:** [January 5, 2023, 7:36am UTC](https://pdfjs.community/t/pdf-viewer-react-sample-has-error/1927/6 "2023-01-05T07:36:48Z")

</div>

Thank you @tgordon, that worked.

Any chance you can update NPM with these bugfixes?  
[https://www.npmjs.com/package/@pdftron/pdfjs-express-viewer](https://www.npmjs.com/package/@pdftron/pdfjs-express-viewer) still has the unpatched 8.7.0 version.

---

<div class="post-metadata">

**Author:** ![tgordon](https://avatars.discourse-cdn.com/v4/letter/t/aca169/32.png) [@tgordon](https://pdfjs.community/u/tgordon)\
**Post date:** [January 13, 2023, 5:40pm UTC](https://pdfjs.community/t/pdf-viewer-react-sample-has-error/1927/7 "2023-01-13T17:40:09Z")

</div>

Hello twidel,

We will update the NPM with the latest build

Best regards,  
Tyler Gordon

---

<div class="post-metadata">

**Author:** ![twidel](https://avatars.discourse-cdn.com/v4/letter/t/ed8c4c/32.png) [@twidel](https://pdfjs.community/u/twidel)\
**Post date:** [January 13, 2023, 5:58pm UTC](https://pdfjs.community/t/pdf-viewer-react-sample-has-error/1927/8 "2023-01-13T17:58:29Z")

</div>

Great, thank you @tgordon. Can you reply when NPM has been updated? Will it have a new version?

---

<div class="post-metadata">

**Author:** ![wgolebi](https://avatars.discourse-cdn.com/v4/letter/w/59ef9b/32.png) [@wgolebi](https://pdfjs.community/u/wgolebi)\
**Post date:** [January 18, 2023, 5:21pm UTC](https://pdfjs.community/t/pdf-viewer-react-sample-has-error/1927/9 "2023-01-18T17:21:20Z")

</div>

> [@tgordon](#):
>
> PDFJS Express

hi @tgordon , is there any ETA for updating NPM for PDFJS Express with the fixes for the mentioned issue? I’m running into the same problem.

thanks a lot

---

<div class="post-metadata">

**Author:** ![samiam](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@samiam](https://pdfjs.community/u/samiam)\
**Post date:** [January 19, 2023, 5:17pm UTC](https://pdfjs.community/t/pdf-viewer-react-sample-has-error/1927/10 "2023-01-19T17:17:32Z")

</div>

These patched files work for me as well, thanks!. Will you be able to update the npm soon?

---

<div class="post-metadata">

**Author:** ![tgordon](https://avatars.discourse-cdn.com/v4/letter/t/aca169/32.png) [@tgordon](https://pdfjs.community/u/tgordon)\
**Post date:** [January 20, 2023, 8:39pm UTC](https://pdfjs.community/t/pdf-viewer-react-sample-has-error/1927/11 "2023-01-20T20:39:10Z")

</div>

Hello samiam,

The npm has been updated

Best regards  
Tyler
