I need Tesseract in my project so first I used yarn add tesseract.js
after that I used yarn add --dev @types/tesseract.js
. When I try to use ng serve
I get the following error:
ERROR in node_modules/tesseract.js/src/index.d.ts:98:60 - error TS2591: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig.
98 | CanvasRenderingContext2D | File | Blob | ImageData | Buffer;
Anyone knows how to fix this? Thanks in advance