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

Typescript types not resolving when using tsconfig with moduleResolution: "Bundler" #191

Open
jrouleau opened this issue Jan 1, 2024 · 1 comment · May be fixed by #192 or #193
Open

Typescript types not resolving when using tsconfig with moduleResolution: "Bundler" #191

jrouleau opened this issue Jan 1, 2024 · 1 comment · May be fixed by #192 or #193

Comments

@jrouleau
Copy link

jrouleau commented Jan 1, 2024

Could not find a declaration file for module 'tinykeys'. './node_modules/tinykeys/dist/tinykeys.module.js' implicitly has an 'any' type.
  There are types at './node_modules/tinykeys/dist/tinykeys.d.ts', but this result could not be resolved when respecting package.json "exports". The 'tinykeys' library may need to update its package.json or typings.ts(7016)

Here's what I found while researching this issue:
microsoft/TypeScript#52363
https://arethetypeswrong.github.io/?p=tinykeys%402.1.0
https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/UntypedResolution.md
https://stackoverflow.com/questions/72457791/typescript-packages-that-ship-with-mjs-and-d-ts-but-without-d-mts-how-to-i

@jrouleau jrouleau linked a pull request Jan 1, 2024 that will close this issue
@jgoz jgoz linked a pull request Mar 9, 2024 that will close this issue
@KittyGiraudel
Copy link

Perhaps somewhat related, types also cannot be resolved when using "moduleResolution": "node" apparently.

Could not find a declaration file for module 'tinykeys'. '/path/to/node_modules/tinykeys/dist/tinykeys.module.js' implicitly has an 'any' type.
There are types at '/path/to/node_modules/tinykeys/dist/tinykeys.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.ts(7016)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants