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

TypeScript Compilation Fails #673

Open
pags opened this issue Oct 7, 2023 · 3 comments
Open

TypeScript Compilation Fails #673

pags opened this issue Oct 7, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@pags
Copy link

pags commented Oct 7, 2023

Summary

TSError: ⨯ Unable to compile TypeScript:
server/bin/index.ts:81:49 - error TS2349: This expression is not callable.
  Type 'typeof import("Parsr/node_modules/file-type/index")' has no call signatures.

81   let fileType: { ext: string; mime: string } = filetype(fs.readFileSync(filePath));

Steps To Reproduce
Steps to reproduce the behavior:

  1. npm i
  2. npm run run:debug -- --input-file samples/t1.pdf --output-folder dist/ --document-name example --config server/defaultConfig.json --pretty-logs

Environment

  • Reference commit/version: dd2bc04
  • OS: Ubuntu
@pags pags added the bug Something isn't working label Oct 7, 2023
@dieideeistgut
Copy link

dieideeistgut commented Jan 11, 2024

~~Hey @pags - did you ever find the fix for this? curious! ;) ~~
Edit: nevermind, figured it out. It's the file-type version.

@tianli
Copy link

tianli commented Jan 30, 2024

Edit: nevermind, figured it out. It's the file-type version.

I had the same issue, could you share how to resolve it? Thx!

@GilbertHLam
Copy link

Downgrading the file-type package back down to 9.0.0 worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants