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

Types are missing for tesseract-wasm/node #82

Open
MatteoGauthier opened this issue Apr 3, 2023 · 1 comment
Open

Types are missing for tesseract-wasm/node #82

MatteoGauthier opened this issue Apr 3, 2023 · 1 comment

Comments

@MatteoGauthier
Copy link

Hey I just noticed a TS error when used with node

import { createOCRClient } from "tesseract-wasm/node";
Cannot find module 'tesseract-wasm/node' or its corresponding type declarations.ts(2307)
@robertknight
Copy link
Owner

Thanks for the report. The types in this package are currently only for the "root" tesseract-wasm import. Making types work for tesseract-wasm/node will involve using TS's support for the exports field in package.json to specify where to find types, per https://www.typescriptlang.org/docs/handbook/esm-node.html#packagejson-exports-imports-and-self-referencing.

@robertknight robertknight changed the title TS issue on node.js with createOCRClient Types are missing for tesseract-wasm/node Apr 4, 2023
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