-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
I am trying to run scribe.js-ocr in an api endpoint with Next.JS. Here's a function called from my route (taken from the example)
'use server'
import scribe from 'scribe.js-ocr'
export const extractOCRFromImage = async () => {
scribe
.extractText(['https://tesseract.projectnaptha.com/img/eng_bw.png'])
.then((res) => console.log(res))
}
I get the following error when running my next.js app on dev local:
⨯ TypeError: createRequire is not a function
at eval (webpack-internal:///(rsc)/./node_modules/scribe.js-ocr/js/containers/fontContainer.js:29:24) {
page: '/api/import'
This is on Node v20.16.0 with scribe-ocr version ^0.5.1
Any help would be greatly appreciated
Metadata
Metadata
Assignees
Labels
No labels