Skip to content

When using corePath by oneself, the built-in judgment is not rigorous #1019

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

Open
Xu-qingsong opened this issue Apr 21, 2025 · 1 comment
Open

Comments

@Xu-qingsong
Copy link

The judgment in line 23 is not rigorous enough. If it were my own cdn suffix, it would very likely not be a link ending with js but a cdn link with some kind of key.
Image

@Balearica
Copy link
Member

This condition only exists to avoid breaking certain old code written with very old/depreciated versions of Tesseract.js. It is not intended to trigger for new code, and may be removed entirely in a future version.

The corePath argument should be set to a directory that contains all 4 builds from the Tesseract.js-core package. This is explained in the docs here. This is critical if you plan on deploying Tesseract.js in the real world. Some builds are much larger and/or slower, however others only run with certain devices/settings, so Tesseract.js needs to be able to pick the correct build.

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