Errors when try to use pdf2json with typescript

987 Views Asked by At

when i try to import pdf2json (3.0.1) in my node project (typescript) iam getting this error

Could not find a declaration file for module 'pdf2json'

Also i try to install @types/pdf2json for typescript and there is not available.

How i can solve this

install @types/pdf2json for typescript and there is not available.

2

There are 2 best solutions below

0
On

Looks like you're right that there are currently no types available, but that's a work in progress and they may exist soon: https://github.com/modesty/pdf2json/pull/278

0
On

I know it's late but someone might need it. try installing the package this way:

npm install --save pdf2json