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

Could not find a declaration file for module 'my-library-vue-ts'. #7

Open
Felixclement opened this issue Nov 2, 2023 · 2 comments · May be fixed by #8
Open

Could not find a declaration file for module 'my-library-vue-ts'. #7

Felixclement opened this issue Nov 2, 2023 · 2 comments · May be fixed by #8

Comments

@Felixclement
Copy link

Felixclement commented Nov 2, 2023

Hi @IsraelDCastro I was following this tutorial
https://medium.com/@blaster203/how-to-create-a-component-library-with-vue-3-vitejs-typescript-8eb41f799045

Any idea why TS is complaining about types here

Could not find a declaration file for module 'my-library-vue-ts'. '' implicitly has an 'any' type.
There are types at '/Users/felixclement/Documents/Dev/frontend-vuejs3/synps/node_modules/my-library-vue-ts/dist/main.d.ts', but this result could not be resolved when respecting package.json "exports". The 'my-library-vue-ts' library may need to update its package.json or typings.ts(7016)

Screenshot 2023-11-02 at 2 45 10 PM
@classicalguss
Copy link

Same here. Is this something new with Vite? Npm? Not sure.

@IsraelDCastro
Copy link
Owner

IsraelDCastro commented Dec 27, 2023

Hi, I had the same problem with other libraries that I had created. The problem is in the package.json in the way you make the export and import.

I'll check the tutorial again and I'll give you an answer as soon as possible.

For any references check #6

@sniper7kills sniper7kills linked a pull request Jan 17, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

3 participants