-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Update to latest tesseract then V8 platform used by this instance of Node does not support creating Workers #756
Comments
Tesseract.js is confirmed to work with Node 14 (we have unit tests for this), so your steps to reproduce will not create any error. Please provide enough code to reproduce the error. You can also link to a repository with a minimal example. Also, it does not look like Node v14.6.1 exists. |
It sounds like you are trying to use the Node version of Tesseract.js for Electron, which will not work. You should use the browser version of Tesseract.js. |
I'm thinking of using the browser version. Can I set a local lang traineddata path like the node version? I don't see the doc and example having it specified. |
For the browser version, to avoid using any remote CDN you would need to specify In general, the browser version will not have direct access to the local filesystem (this is true of all browser-based code), so running the browser examples locally still requires using a local http server. I have not used Electron personally, so am not immediately sure what that would look like within an Electron context. |
Thinking about this more, presumably to have everything local in Electron it would be read from the local filesystem from some Electron-provided function, and then passed to Tesseract.js as an arraybuffer. Let me know if that sounds right. I would need to think about whether that is currently possible or if it would require an update to Tesseract.js. |
@lincdh I found it was possible to use Tesseract.js fully offline (including local |
Closing as completed, as a fully offline example of Tesseract.js v4.0.5 running on Electron has been provided. |
Tesseract.js version (version number for npm/GitHub release, or specific commit for repo)
v4.0.5
Describe the bug
On tesseract v2.1.5 everything works correctly. Once updated to v4.0.5 this error happens.
To Reproduce
Steps to reproduce the behavior:
Try this code:
Expected behavior
Latest version should work without error just like the v2.1.5 version.
Device Version:
The text was updated successfully, but these errors were encountered: