Giter Club home page Giter Club logo

Comments (11)

curiosity26 avatar curiosity26 commented on June 3, 2024 2

Yea! looks good.

from react-pdf-highlighter.

z4m0 avatar z4m0 commented on June 3, 2024 1

Updating to 2.0.943 doesn't seem to help.

The browser console shows this error:

bootstrap:1 Uncaught ReferenceError: window is not defined

And the bash console shows this warning:

./node_modules/pdfjs-dist/build/pdf.js
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

from react-pdf-highlighter.

ranihorev avatar ranihorev commented on June 3, 2024 1

@agentcooper I used your demo as is with a new project I created with create-react-app

I hacked it by installing the new version of pdfjs-dist and replacing the import of pdfjs in PdfLoader with:

import pdfjs from 'pdfjs-dist';
pdfjs.GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${ pdfjs.version }/pdf.worker.js`

from react-pdf-highlighter.

mapreal19 avatar mapreal19 commented on June 3, 2024

@curiosity26 solved now?

from react-pdf-highlighter.

z4m0 avatar z4m0 commented on June 3, 2024

It's not working for me with webpack 4 seems that pdfjs-dist wasn't updated is there a way to use the webpack 4 compatible version?

from react-pdf-highlighter.

agentcooper avatar agentcooper commented on June 3, 2024

@z4m0 could you please try updating the version and see if this helps? If yes, I'll gladly accept a PR.

from react-pdf-highlighter.

ranihorev avatar ranihorev commented on June 3, 2024

It's not working for me as well. Does Anyone know how to fix?

from react-pdf-highlighter.

agentcooper avatar agentcooper commented on June 3, 2024

@ranihorev could you please create a reproducible example?

from react-pdf-highlighter.

agentcooper avatar agentcooper commented on June 3, 2024

@ranihorev thanks, I'll try to update pdfjs-dist dependency this weekend

from react-pdf-highlighter.

Marlendo avatar Marlendo commented on June 3, 2024

haiii @ranihorev i have same problem like you...
i has build new project create-react-app and then i have error
"bootstrap:1 Uncaught ReferenceError: window is not defined"
at bootstrap:1
at bootstrap:788
you have solved this issue ???

from react-pdf-highlighter.

ranihorev avatar ranihorev commented on June 3, 2024

@Marlendo I solved it with the solution above:
#14 (comment)

Have you tried that?

from react-pdf-highlighter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.