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

Invalid TS typing file extension #287

Open
fabis94 opened this issue May 11, 2023 · 5 comments
Open

Invalid TS typing file extension #287

fabis94 opened this issue May 11, 2023 · 5 comments

Comments

@fabis94
Copy link

fabis94 commented May 11, 2023

Could not find a declaration file for module 'vue-tippy'. '/home/fabis/Code/speckle/speckle-server/packages/ui-components/node_modules/vue-tippy/dist/vue-tippy.mjs' implicitly has an 'any' type.
  There are types at '/home/fabis/Code/speckle/speckle-server/packages/ui-components/node_modules/vue-tippy/dist/vue-tippy.d.ts', but this result could not be resolved when respecting package.json "exports". The 'vue-tippy' library may need to update its package.json or typings

This is when importing the package from a repo that uses the nodenext or node16 TypeScript moduleResolution algorithm. If the build file extension is .mjs, then the typings file must be .d.mts. Either that or you must specify the typings file explicitly in the exports map of your package.json.

@Waujito
Copy link

Waujito commented May 20, 2023

This is the cause of typescript 5 migration. It looks like package.json exports module is configured incorrectly. You can set resolvePackageJsonExports to false to use the old typescript system of module export resolution and wait for authors to fix this issue.

@fabis94
Copy link
Author

fabis94 commented May 20, 2023

@Waujito Setting 'resolvePackageJsonExports' to false isn't a real fix tho as that would disable exports resolution entirely for all packages. The real fix would be to fix this package's package.json

@KABBOUCHI
Copy link
Owner

fixed in vue-tippy@v6.2.0

@Waujito
Copy link

Waujito commented May 20, 2023

It works, thank you!

@DamianGlowala
Copy link

@fabis94 are you happy to close this issue should you confirm it is working in v6.2.0?

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

4 participants