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

RxDb 15.17 and TypeScript Error #5884

Closed
mr-menno opened this issue Apr 9, 2024 · 4 comments
Closed

RxDb 15.17 and TypeScript Error #5884

mr-menno opened this issue Apr 9, 2024 · 4 comments

Comments

@mr-menno
Copy link

mr-menno commented Apr 9, 2024

Using RxDb 15.17.0, getting the following typescript errors:

error TS2305: Module '"rxdb"' has no exported member 'RxDocument'.

6 import { RxCollection, RxDatabase, RxDocument } from 'rxdb';

When downgrading to 14.17.1, the error stops occurring.

@mr-menno
Copy link
Author

mr-menno commented Apr 9, 2024

Sample repo: https://github.com/mr-menno/rxdb-test. File sample is database.ts

@pubkey
Copy link
Owner

pubkey commented Apr 10, 2024

Interesting, this seems to be vite related.
The RxDB default export looks to be correct: https://github.com/pubkey/rxdb/blob/master/package.json#L90

@tsuharesu
Copy link

tsuharesu commented Apr 11, 2024

Could it be that after v15 Typescript 5 is required? https://rxdb.info/releases/15.0.0.html#requires-at-least-typescript-version-500. I see that you project uses TS 4.

I was having the same issue, using CRA, and using the following workaround facebook/create-react-app#13080 (comment) made it work.

@pubkey
Copy link
Owner

pubkey commented Apr 17, 2024

Closing this. Typescript v5 is required for RxDB.

@pubkey pubkey closed this as completed Apr 17, 2024
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

3 participants