-
Notifications
You must be signed in to change notification settings - Fork 221
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
Issue with react-native-qrcode-svg: Property 'TextEncoder' doesn't exist #233
Comments
same issue! 6.3.14 went back down to 6.3.12 |
Hello, Please read this section of the README: https://github.com/Expensify/react-native-qrcode-svg?tab=readme-ov-file#integrating-react-native-qrcode-svg-with-react-native-versions-below-075 I hope it provides the necessary answers. |
Hi, |
Same issue with React-Native 0.76.6 "react-native-qrcode-svg": "^6.3.14" System: |
I encountered an issue when using the react-native-qrcode-svg package, where it appears to depend on the text-encoding package, but not working as it supposed to be. This causes an error during runtime, as the required module cannot be resolved.
Steps to Reproduce:
Install react-native-qrcode-svg using yarn add react-native-qrcode-svg ("react-native-qrcode-svg": "^6.3.14",)
Import and use the package in a React Native project.
Run the app on Android, and you will encounter the following error:
Error: Property 'TextEncoder' doesn't exist
Expected Behavior:
The package should either:
Include the text-encoding dependency as part of its installation.
Remove the reliance on text-encoding if it is no longer necessary.
Actual Behavior:
The package attempts to import text-encoding, leading to the above error, which prevents the app from functioning properly.
Temporary Workaround:
As a temporary fix, I manually installed the text-encoding package in my project:
yarn add text-encoding
and using import 'text-encoding' at top on whenever I am using the QRCode
This resolved the error, but it's not ideal for long-term use.
Environment Details:
React Native version: 0.72.4
react-native-qrcode-svg version: ^6.3.14
Platform: Android
Node.js version: 22.9.0
Yarn version: 1.22.1
Suggestions:
Update the documentation to reflect the need to install text-encoding as a peer dependency if it's intended.
If the dependency on text-encoding is outdated or unnecessary, consider removing it from the codebase.
Thank you for your work on this package! Let me know if you need additional details to troubleshoot this issue.
The text was updated successfully, but these errors were encountered: