-
Notifications
You must be signed in to change notification settings - Fork 415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blob undefined #36
Comments
Can you give more details please? What is the environment (browser, nodejs, unit test) etc |
chrome, node 6.11.2, jest, mac, using arc base react |
Check this #35 |
Let me know if that fixes it |
Are you trying to server render it ? |
nope.. im using react-qr-reader on the client |
What is your bundle build pipline? |
i think you are right, there is something on the server rendering that includes the react-qr-code. thanks a lot. |
How did you resolve this? I'm running into the same issue. |
Same here, using it in electron with next.js, whenever I refresh the main window, the error appears |
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. |
@RachelAntion Just shallow render your components, or conditionally render it or a placeholder based on the environment (node or browser). |
@JodusNodus can you give me an example of conditional rendering in react using the environment? |
ive made a condition |
ReferenceError: Blob is not defined at Object.<anonymous> (/Users/wiredots/Projects/new/reactproject/node_modules/react-qr-reader/lib/index.js:26:24) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object.module.exports.Object.defineProperty.value
The text was updated successfully, but these errors were encountered: