Parsr ``` TypeScript 编译失败 ```

q0qdq0h2  于 1个月前  发布在  TypeScript
关注(0)|答案(3)|浏览(66)

摘要

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));

重现步骤

重现该行为所需的步骤:

  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

环境

  • 参考提交/版本: dd2bc04
  • 操作系统:Ubuntu
owfi6suc

owfi6suc1#

嘿,@pags - 你找到这个修复了吗?好奇!;)
编辑:没关系,我找到了。这是文件类型版本。

mdfafbf1

mdfafbf12#

编辑:没关系,我弄明白了。这是文件类型的版本。
我也遇到了同样的问题,你能分享一下如何解决吗?谢谢!

dgsult0t

dgsult0t3#

将文件类型包降级回9.0.0对我有效。

相关问题