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

Missing type paths for TypeScript 4.7 Node16 modules #95

Closed
jbaldassari opened this issue Dec 18, 2023 · 1 comment · Fixed by #96
Closed

Missing type paths for TypeScript 4.7 Node16 modules #95

jbaldassari opened this issue Dec 18, 2023 · 1 comment · Fixed by #96

Comments

@jbaldassari
Copy link

I believe that rxfire has the same TS/ESM compatibility problem as the firebase-js-sdk issue here: firebase/firebase-js-sdk#6300. The problem occurs with TS 4.7+ and ESM with the following tsconfig.json options:

{
  "compilerOptions": {
    "module": "Node16",
    "moduleResolution": "Bundler",
    "target": "ESNext",
  }
}

I'm actually running into the error in a project that uses reactfire, which depends on rxfire. Compilation fails with errors like:

./node_modules/reactfire/dist/database.d.ts:1:29 - error TS7016: Could not find a declaration file for module 'rxfire/database'. './node_modules/rxfire/database/index.esm.js' implicitly has an 'any' type.
  There are types at './node_modules/rxfire/database/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'rxfire' library may need to update its package.json or typings.

1 import { QueryChange } from 'rxfire/database';

Related:

@harshmandan
Copy link
Contributor

having the same problem with typescript 5

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

Successfully merging a pull request may close this issue.

2 participants