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

5.0.4 Regarding the issue of compatibility app error "Blob is not defined" #879

Closed
NovelForum opened this issue Jan 28, 2024 · 2 comments
Closed

Comments

@NovelForum
Copy link

I have no problem using version 2.0.0 in Uniapp, but during component initialization, I need to copy the CDN from the local file to Plus.io, package the APK, and directly use the file from Plus.io in the APK. However, using the same method, I encountered an error message "ReferenceError: Blob is not defined" on 5.0.4, and the initialization of createWorker failed. May I ask what the problem is? Does 5.0.4 support apps?

Uploading image.png…

@Balearica
Copy link
Collaborator

I am not familiar with the particular framework you are referring to. You should be able to use Tesseract.js within any project that runs on the browser or using Node.js v14 or higher.

The error message ReferenceError: Blob is not defined indicates the code is trying to create a Blob in a context where Blob is not defined. The most likely explanation is that you are trying to use the browser version of Tesseract.js (which uses blobs) within a project that uses Node.js (which does not have blobs). If you are using Node.js, you should be sure to use the Node.js version of Tesseract.js rather than the browser version. Examples of both can be found in the examples directory here.

@NovelForum
Copy link
Author

Thank you very much for your reply. I have already resolved this issue.

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