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

Types are missing #244

Closed
Joebayld opened this issue Aug 13, 2024 · 11 comments
Closed

Types are missing #244

Joebayld opened this issue Aug 13, 2024 · 11 comments

Comments

@Joebayld
Copy link

I was on version 3.0.2 and when I tried upgrading to either 3.0.5 or 3.1, I now have an error that the types are not found.

Screenshot 2024-08-13 at 2 44 30 PM

If I downgrade back to 3.0.2 it's fine.

@Avarow
Copy link

Avarow commented Aug 20, 2024

Doesn't help, issue is still present

@Joebayld
Copy link
Author

Doesn't help, issue is still present

I don't think there was any suggested fix? I just quoted what broke it. Looks like this copy script is overwriting the generated types.

@Avarow
Copy link

Avarow commented Aug 20, 2024

Oh, thought @lavrton tried a fix on #243

@Joebayld
Copy link
Author

Joebayld commented Sep 4, 2024

I get the feeling not many people use typescript with this because it's very broken right now

@Joebayld
Copy link
Author

@lavrton can you please look into this. It appears the new build script cp ./index.d.ts ./dist/index.d.ts is overwriting the types that the module is already building.

@lavrton
Copy link
Member

lavrton commented Sep 16, 2024

I just added generated types and released a new version. I need feedback whether it works or not.

@Joebayld
Copy link
Author

Joebayld commented Sep 16, 2024

@lavrton Just tested it. Still no luck - but I think I found the fix.

I'm not sure what types.d.ts is, but if you change the package.json to use vue-konva.d.ts it fixes it. See screenshot:

Screenshot 2024-09-16 at 3 29 38 PM

@lavrton
Copy link
Member

lavrton commented Sep 16, 2024

@Joebayld what about now with v 3.1.2?

@Joebayld
Copy link
Author

@lavrton Fixed! thanks

@lavrton lavrton closed this as completed Sep 17, 2024
@odetolakehinde
Copy link

odetolakehinde commented Oct 7, 2024

I have this same issue with nuxt 3 when I do this:

import * as VueKonva from 'vue-konva';

export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.use(VueKonva)
})

error:

Argument type
{   readonly default: {     install: (app: any, options?: {       prefix?: string,       customNodes?: Record<string, KonvaNodeConstructor>     }) => void   } }
is not assignable to parameter type  Plugin<unknown[]>    Assigned type doesn't contain call signatures 

in node_modules/vue-konva/dist/index.d.ts


however, I get this:

Uncaught SyntaxError: The requested module '/_nuxt/node_modules/konva/lib/index.js?v=8985994c' does not provide an export named 'default' (at vue-konva.js?v=8985994c:16:8)

when I do this:

import VueKonva from 'vue-konva';

export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.use(VueKonva)
})

@lavrton
Copy link
Member

lavrton commented Oct 8, 2024

@odetolakehinde Please make a separate issue with a very small repository to reproduce the 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

No branches or pull requests

4 participants