-
-
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
fork is not a function #110
Comments
Surprisingly, including the <script> tag in a simple HTML file (no Meteor) does actually work. I can only suppose that my attempts to use tesseract.js in Meteor failed due to some mysterious Meteor dependence mangling madness. Now... we encounter the next issue:
The "then" function is never executed. I only see this error one time, on load:
OK, moving on to server-side solutions... |
Hey @madc0w, I was having the same problem with this in Meteor. Once I saw the attempt at using child_process on the client side, I just included the script like you did. Adding a progress handler seems to fix things from that point:
|
I'm guessing what's happening is that Meteor is ignoring the package.json browser override and trying to load the nodejs server version of the code (which uses |
@dhrubins , thanks for that hint. After adding the progress handler, I now advance to the next obstacle:
Note that this is with just plain HTML/JS, no Meteor involved here at all. Anyway, I've long abandoned this client-side OCR approach in favor of using Tesseract on the server, which works fine. |
dont know if people had figured it out import Tesseract from 'tesseract.js/dist/tesseract.js'; |
Close for now as the issue is resolved. |
I've tried with npm installation, with a <script> tag as described, and also by downloading and including the source code in a local library. Same result:
Then I tried installing the fork npm package ( https://www.npmjs.com/package/fork ). This fails, since (I am guessing...) fork is a server-side function. require("fork") on the client results in "Uncaught Error: Cannot find module 'fork'". On the server, I can successfully require fork, but that does not solve this issue, as I was really hoping to use Tesseract client-side.
The text was updated successfully, but these errors were encountered: