Error [ERR_REQUIRE_ESM]: require() of ES Module D:\Git\comic-ocr-translation-web\node_modules\chrome-lens-ocr\src\index.js from D:\Git\comic-ocr-translation-web\dist\modules\ocr-translation\ocr-translation.service.js not supported.
Instead change the require of index.js in D:\Git\comic-ocr-translation-web\dist\modules\ocr-translation\ocr-translation.service.js to a dynamic import() which is available in all CommonJS modules.
at Object. (D:\Git\comic-ocr-translation-web\dist\modules\ocr-translation\ocr-translation.service.js:12:27) {
code: 'ERR_REQUIRE_ESM'
}
I'm using typescript for my project and when it compiles, import() statement was converted to require() so i ran into this error