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

dexie-export-import missing types #1900

Closed
humphd opened this issue Feb 8, 2024 · 3 comments
Closed

dexie-export-import missing types #1900

humphd opened this issue Feb 8, 2024 · 3 comments

Comments

@humphd
Copy link

humphd commented Feb 8, 2024

I am trying to upgrade a project:

  • dexie-export-import: from 4.0.7 to 4.1.0
  • typescript: from 5.2.2 to 5.3.3
  • vite: from 5.0.12 to 5.1.0

When I make these changes, I suddenly start getting missing type errors on dexie-export-import:

> tsc && vite build

src/components/PreferencesModal.tsx:106:41 - error TS7016: Could not find a declaration file for module 'dexie-export-import'. '/Users/humphd/repos/chatcraft.org/node_modules/.pnpm/dexie-export-import@4.1.0_dexie@3.2.4/node_modules/dexie-export-import/dist/dexie-export-import.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/dexie-export-import` if it exists or add a new declaration (.d.ts) file containing `declare module 'dexie-export-import';`

106       const { exportDB } = await import("dexie-export-import");
                                            ~~~~~~~~~~~~~~~~~~~~~

src/components/PreferencesModal.tsx:125:18 - error TS7016: Could not find a declaration file for module 'dexie-export-import'. '/Users/humphd/repos/chatcraft.org/node_modules/.pnpm/dexie-export-import@4.1.0_dexie@3.2.4/node_modules/dexie-export-import/dist/dexie-export-import.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/dexie-export-import` if it exists or add a new declaration (.d.ts) file containing `declare module 'dexie-export-import';`

125           import("dexie-export-import")
                     ~~~~~~~~~~~~~~~~~~~~~


Found 2 errors in the same file, starting at: src/components/PreferencesModal.tsx:106

I haven't had these in the past. I looked at the code in dist/dexie-export-import/dist and there is no .d.ts file. The package.json says:

  "typings": "dist/dexie-export-import.d.ts",

But it doesn't exist.

@dfahlander
Copy link
Collaborator

Thanks for noticing this. I could reproduce it and found an error in the release script.
New version coming out soon.

@humphd
Copy link
Author

humphd commented Feb 8, 2024

@dfahlander amazing, thank you!

@humphd
Copy link
Author

humphd commented Feb 8, 2024

Confirmed, 4.1.1 fixes me. Thanks for the fast turnaround!

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

2 participants