exzos28 / react-native-qr-svg

MIT License
32 stars 6 forks source link

ReferenceError: Property 'TextEncoder' doesn't exist #5

Closed mattjbrill closed 1 week ago

mattjbrill commented 1 week ago

Greetings,

FYI, the qrcode dependency has an issue in 1.5.4, which is causing this ReferenceError: Property 'TextEncoder' doesn't exist error (https://github.com/soldair/node-qrcode/issues/373#issuecomment-2309924576). They do not currently have a fix available. Resolving the dependency to 1.5.3 (instead of ^1.5.3) works around this issue for now.

Thanks for everything you're doing! Appreciate it!

exzos28 commented 1 week ago

I've release 1.4.0 with 1.5.4 qrcode. You are welcome.

exzos28 commented 1 week ago

Maybe I didn't understand you completely. Does qrcode 1.5.4 have this problem?

mattjbrill commented 1 week ago

Oh wow you're fast! Haha!

My apologies. Yes, qrcode 1.5.4 has the problem. 1.5.3 does not have the problem. Your package.json uses "qrcode": "^1.5.0", and the caret (^) means it will grab whatever version is compatible with the one you've listed. So you'll need to use "qrcode": "1.5.3" instead of "qrcode": "^1.5.0".

Sorry, I should have just put up a pr :(

exzos28 commented 1 week ago

🌚 Yeah, I know what the caret means. But there is a lock file in the project that saves the version at the time of installation. Anyway, thanks for the information.

What about qrcode... I have a plan to rewrite or find different solution for this package. But that's just a plan. Haha.

P.S I've released the patch for this mistake.

mattjbrill commented 1 week ago

My bad. I'm used to working with juniors. Haha!

Awesome thank you!