Skip to content
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

ReferenceError:“TextEncoder”未定义 #373

Open
wjyzhixing opened this issue Aug 23, 2024 · 2 comments
Open

ReferenceError:“TextEncoder”未定义 #373

wjyzhixing opened this issue Aug 23, 2024 · 2 comments

Comments

@wjyzhixing
Copy link

Hello!My node version is v16.20.0.

I installed version 1.5.4 of qrcode, and I encountered an error on IE11. The error message is as follows:"

1724416648537

How can I deal with this problem?Or is this a bug?It will appreciate that if you can give me some advice.

@M393
Copy link

M393 commented Aug 26, 2024

TextEncoder usage was added with #317 v1.5.4, so either use 1.5.3 or add a polyfill for TextEncoder like https://github.com/anonyco/FastestSmallestTextEncoderDecoder

@wjyzhixing
Copy link
Author

yes,now I use v1.5.3 version.But if I use v1.5.4.If I alse use fastestsmallesttextencoderdecoder-encodeinto.I can only resolve the import of TextEncoder in my code.How to deal with the code in node_modules lib?my npm run build is base in babel.Here is my babel.config.js
image
How can I do more to fix in v1.5.4?I realy want to learn this method to solve it.Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants