ravendb/ravendb-nodejs-client

error TS2507: Type 'typeof FilterBase' is not a constructor function type.

hoghweed opened this issue · 8 comments

I'm using ravendb within my pnpm monorepo.
When I try to build my project using typescript, I have a sad error reporting:

error TS2507: Type 'typeof FilterBase' is not a constructor function type.

 6 export declare class TransformKeysJsonStream extends FilterBase {

Found 1 error in ../../node_modules/.pnpm/ravendb@5.2.3/node_modules/ravendb/dist/Mapping/Json/Streams/TransformKeysJsonStream.d.ts:6

My configuration is:

  • A pnpm monorepo
  • Typescript project ver 4.7.2
  • Node 16.12.0

I installed all the types for:

  • bluebird
  • readable-stream
  • stream-json
  • ws

I solved all the problems installing the types but for the above is quite impossible to solve it.
Any idea?

Thanks in advance

ml054 commented

Hi,

All deps like readable-stream, stream-json should be installed along with ravendb automatically and there is no need to install them manually. Could you share some project template which demonstrate your issue? Looks like pnpm resolves deps in different way then npm (maybe due unflat?)

Kloen commented

@ml054 not sure if it's the same case, but I just faced almost the same issue, this is, likely, a bare minimum case able to reproduce the issue:

https://github.com/Kloen/ravendb-ts-error/runs/6899500064

ml054 commented

@Kloen I reproduced your issue. Working on the fix. Thanks :)

ml054 commented

Fixed in #313

ml054 commented

I'd about to release version 5.2.4.

ml054 commented

5.2.4 released - verified your example - it compiles successfully

Kloen commented

Thank you!