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
Worker Script Path has 'http:/localhost' prepended, causing MODULE_NOT_FOUND error #474
Comments
Same issue here on Node 14 Also does it on tesseract.js@next |
Hi @sssanwar ! |
This is strictly To solve it simply set testEnvironment option to /**
* @jest-environment node
*/ at the top of the affected file. related issue: jestjs/jest#3692 |
If this issue is still active can somebody please upload a reproducible code snippet/repo that produces this error? Seems likely this can be fixed but I'm not a Jest user. |
@Balearica I believe this was fixed(#498) and deployed in 2.1.5. |
@marcincichocki Thanks for confirming, closing the issue. |
Describe the bug
When trying to run tesseract.js in Jest for a unit test I get this error message saying it's unable to load worker-script. Upon inspection the supplied path appeared somehow has been concatenated with 'http:/localhost/'.
To Reproduce
Install tesseract.js and tesserract-core.js throught npm or yarn. I am using yarn in this case. Write a unit test in jest to load tesseract. I tried supplying the 'workerPath', it didn't seem to help. The supplied path would also have the 'localhost' string prepended to the path.
The issue does not happen when I run tesseract.js in a browser.
Expected behavior
The worker-script path shouldn't have been concatenated with 'http:/localhost'.
Desktop:
The text was updated successfully, but these errors were encountered: