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

Issue with nextjs app router #842

Closed
Hillel-Nagid opened this issue Oct 17, 2023 · 2 comments
Closed

Issue with nextjs app router #842

Hillel-Nagid opened this issue Oct 17, 2023 · 2 comments

Comments

@Hillel-Nagid
Copy link

Hillel-Nagid commented Oct 17, 2023

Tesseract.js version (version number for npm/GitHub release, or specific commit for repo)
5.0.2
Describe the bug
I have tried to use the library in a Next.js project using route handlers. I "copy-paste"ed the expamle from the README file, and got the following error when running: uncaughtException: Error: Cannot find module '.next\worker-script\node\index.js'

To Reproduce
Steps to reproduce the behavior:
npx create-next-app@latest
create a route handler
initialize createWorker('eng')
read an image buffer from file, and pass it to worker.recognize()

Expected behavior
I expected the code to run

Device Version:

  • OS + Version: Windows 11
  • Node version Node v19.4.0
@Balearica
Copy link
Collaborator

It looks like several of these steps require writing code. Please provide an example repo that can be easily cloned and run to produce this issue.

@Balearica
Copy link
Collaborator

Closing as it's unclear if this is an issue with Tesseract.js or the specific code and/or framework at issue. Will reopen if a reproducible example is provided.

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