IsraelDCastro / my-library-vue-ts

24 stars 18 forks source link

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

Open Felixclement opened 1 year ago

Felixclement commented 1 year ago

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 commented 10 months ago

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

IsraelDCastro commented 10 months ago

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