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

Cannot compile project with 3.1.3 #349

Open
gladykov opened this issue May 29, 2024 · 5 comments
Open

Cannot compile project with 3.1.3 #349

gladykov opened this issue May 29, 2024 · 5 comments

Comments

@gladykov
Copy link
Contributor

> tsc

node_modules/pdf2json/dist/pdfparser.d.ts:6:39 - error TS2304: Cannot find name 'StringifyStream'.

6  static get StringifyStream(): typeof StringifyStream
                                        ~~~~~~~~~~~~~~~

node_modules/pdf2json/dist/pdfparser.d.ts:30:39 - error TS2304: Cannot find name 'Readable'.

30  static createContentStream(jsonObj): Readable
                                         ~~~~~~~~

node_modules/pdf2json/dist/pdfparser.d.ts:31:58 - error TS2503: Cannot find namespace 'fs'.

31  static createOutputStream(outputPath, resolve, reject): fs.WriteStream
                                                            ~~
@gladykov
Copy link
Contributor Author

gladykov commented Jun 7, 2024

Prepared simple repo with reproduction steps: https://github.com/gladykov/pdf2json-bug

clone
npm install
tsc

@modesty
Copy link
Owner

modesty commented Jun 9, 2024

you need to exclude "./node_modules/**/*.*", they're pre-compiled.

@gladykov
Copy link
Contributor Author

Unfortunately this didn't work: https://github.com/gladykov/pdf2json-bug/blob/main/tsconfig.json and the bug still exists.

As you can see only 2 folders are included, and also excluded node_modules (tried with "./node_modules/**/*.*" as well).

@nquitocix
Copy link

did you fix?

@GonzaloOrellanaC
Copy link

uninstall and install lower version

npm rm pdf2json

npm i [email protected]

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

4 participants