fatihsolhan / v-onboarding

v-onboarding is a super-slim, fully-typed onboarding component for Vue 3
https://v-onboarding.fatihsolhan.com/
MIT License
164 stars 20 forks source link

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

Closed micke-dahlgren closed 2 months ago

micke-dahlgren commented 3 months ago

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)
fatihsolhan commented 3 months ago

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?

iolk commented 3 months ago

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

fatihsolhan commented 3 months ago

thank you @iolk, I'll fix it

macJames976 commented 2 months ago

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

Thanks

fatihsolhan commented 2 months ago

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🙏🏻

bubbzDotDev commented 2 months ago

Experiencing this issue as well.

bubbzDotDev commented 2 months ago

@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

github-actions[bot] commented 2 months ago

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

The release is available on:

Your semantic-release bot :package::rocket:

fatihsolhan commented 2 months ago

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!