KABBOUCHI / vue-tippy

VueJS Tooltip powered by Tippy.js
https://vue-tippy.netlify.app
MIT License
745 stars 92 forks source link

Invalid TS typing file extension #287

Open fabis94 opened 1 year ago

fabis94 commented 1 year ago
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 commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

fixed in vue-tippy@v6.2.0

Waujito commented 1 year ago

It works, thank you!

DamianGlowala commented 1 year ago

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