Coder Social home page Coder Social logo

Blob undefined about react-qr-reader HOT 15 CLOSED

jodusnodus avatar jodusnodus commented on June 9, 2024 1
Blob undefined

from react-qr-reader.

Comments (15)

wiredots01 avatar wiredots01 commented on June 9, 2024 1

i think you are right, there is something on the server rendering that includes the react-qr-code. thanks a lot.

from react-qr-reader.

tomyfalgui avatar tomyfalgui commented on June 9, 2024 1

Same here, using it in electron with next.js, whenever I refresh the main window, the error appears

from react-qr-reader.

JodusNodus avatar JodusNodus commented on June 9, 2024

Can you give more details please? What is the environment (browser, nodejs, unit test) etc

from react-qr-reader.

wiredots01 avatar wiredots01 commented on June 9, 2024

chrome, node 6.11.2, jest, mac, using arc base react

from react-qr-reader.

JodusNodus avatar JodusNodus commented on June 9, 2024

Check this #35

from react-qr-reader.

JodusNodus avatar JodusNodus commented on June 9, 2024

Let me know if that fixes it

from react-qr-reader.

wiredots01 avatar wiredots01 commented on June 9, 2024

dont have problems on test.
when i run the app it stops on this
screen shot 2017-09-04 at 8 02 17 pm

from react-qr-reader.

JodusNodus avatar JodusNodus commented on June 9, 2024

Are you trying to server render it ?

from react-qr-reader.

wiredots01 avatar wiredots01 commented on June 9, 2024

nope.. im using react-qr-reader on the client

from react-qr-reader.

JodusNodus avatar JodusNodus commented on June 9, 2024

What is your bundle build pipline?

from react-qr-reader.

RachelAntion avatar RachelAntion commented on June 9, 2024

How did you resolve this? I'm running into the same issue.

from react-qr-reader.

JodusNodus avatar JodusNodus commented on June 9, 2024

The module uses many things that are browser specific. I'm not familiar with next.js but you should be able to avoid rendering it server side.

from react-qr-reader.

JodusNodus avatar JodusNodus commented on June 9, 2024

@RachelAntion Just shallow render your components, or conditionally render it or a placeholder based on the environment (node or browser).

from react-qr-reader.

powderham avatar powderham commented on June 9, 2024

@JodusNodus can you give me an example of conditional rendering in react using the environment?

from react-qr-reader.

wiredots01 avatar wiredots01 commented on June 9, 2024

ive made a condition if(!config.isServer) { var QrReader = require('react-qr-reader'); }

from react-qr-reader.

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.