Hello everyone,
I’m experiencing an issue with Tesseract.js on my project deployed on Vercel. Until recently, everything was working fine, but now, for no apparent reason, Tesseract can no longer find the required WASM file (tesseract-core-simd.wasm
).
Context
- Version used: Tesseract.js v6
- Environment: Nuxt 3 project hosted on Vercel
- History: My code was previously working without any issues, and OCR processing was running fine.
Error encountered
When calling createWorker()
to run OCR analysis, I now get the following error:
php
CopierModifier
Aborted(Error: ENOENT: no such file or directory, open '/var/task/node_modules/tesseract.js-core/tesseract-core-simd.wasm')
Uncaught Exception: Error [RuntimeError]: Aborted(Error: ENOENT: no such file or directory, open '/var/task/node_modules/tesseract.js-core/tesseract-core-simd.wasm').
at n (/var/task/node_modules/tesseract.js-core/tesseract-core-simd.js:13:225)
at Ma (/var/task/node_modules/tesseract.js-core/tesseract-core-simd.js:14:143)
at /var/task/node_modules/tesseract.js-core/tesseract-core-simd.js:14:491
Node.js process exited with exit status: 129.
Questions
- Has anyone else encountered this issue on Vercel?
- Has there been a recent change that prevents Tesseract.js from accessing the WASM file?
- Is there any specific configuration needed in
vercel.json
or elsewhere to ensure the file is accessible?
Any help would be greatly appreciated!
Best regards,