v-onboarding icon indicating copy to clipboard operation
v-onboarding copied to clipboard

Could not find a declaration file for module 'v-onboarding'

Open micke-dahlgren opened this issue 11 months ago • 3 comments

Describe the bug Error TS7016 on the import line import { VOnboardingWrapper, useVOnboarding } from 'v-onboarding'

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

micke-dahlgren avatar Mar 26 '24 10:03 micke-dahlgren

Hi @micke-dahlgren, this issue should've been fixed with v-onboarding 2.8.1 Can you please make sure it's 2.8.1 and provide a reproduction of the issue with codesandbox?

fatihsolhan avatar Mar 26 '24 10:03 fatihsolhan

Hey @fatihsolhan, I encountered the same issue after upgrading from version 2.6.0 to 2.8.1. I've managed to reproduce it using the 2.8.1: https://stackblitz.com/edit/vitejs-vite-jq9x8d

iolk avatar Mar 27 '24 09:03 iolk

thank you @iolk, I'll fix it

fatihsolhan avatar Mar 27 '24 09:03 fatihsolhan

Hi, @fatihsolhan thanks for your job; do you have any news about this problems?

Thanks

macJames976 avatar May 03 '24 14:05 macJames976

Hi, @fatihsolhan

thanks for your job; do you have any news about this problems?

Thanks

Hey @macJames976 sorry it's been quite busy weeks so I couldn't get back to this. I'll fix it as soon as possible. Thanks for your understanding🙏🏻

fatihsolhan avatar May 03 '24 19:05 fatihsolhan

Experiencing this issue as well.

bubbzDotDev avatar May 14 '24 22:05 bubbzDotDev

@iolk @micke-dahlgren @macJames976

I found a workaround while using 2.8.1:

Add declare module "v-onboarding" to a .d.ts file in your src/ directory, like this: src/v-onboarding.d.ts

bubbzDotDev avatar May 15 '24 01:05 bubbzDotDev

:tada: This issue has been resolved in version 2.8.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar May 15 '24 20:05 github-actions[bot]

Hey everyone,

The issue should be fixed now. It turned out to be a simple fix in the end. https://github.com/fatihsolhan/v-onboarding/commit/aa4e435fafc728bf99e298c3578ae6f907cde1a1 Initially, I thought adding types to the package.json would be enough for types, but it seems I needed to include it in the exports as well for proper exporting.

I apologize for the delay in resolving this issue. Your patience is much appreciated. If you encounter any further issues, please don't hesitate to let me know.

Thanks again for your understanding!

fatihsolhan avatar May 15 '24 20:05 fatihsolhan