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

Import problem when using with vue 3 #175

Open
r0hit5292 opened this issue Jan 19, 2023 · 16 comments
Open

Import problem when using with vue 3 #175

r0hit5292 opened this issue Jan 19, 2023 · 16 comments

Comments

@r0hit5292
Copy link

Description
When we are trying to use vue drag and resize with vue3
basically on importing it gives us error and not working with vue 3
Screenshot from 2023-01-18 17-48-05

@RodrigoSpinelli
Copy link

Hello, did you manage to solve this bug?

@r0hit5292
Copy link
Author

n

Hello, did you manage to solve this bug?

not yet

@r0hit5292
Copy link
Author

Hello, did you manage to solve this bug?

do you have idea how to use it with vue 3

@RodrigoSpinelli
Copy link

honestly I researched and saw that it is a headache, I will try to make the component by hand

@r0hit5292
Copy link
Author

yes It is not working properly with Vue3 and also did not get any proper response from vue team also

@JulessZ
Copy link

JulessZ commented Feb 4, 2023

Hi,

same here.
As you mentioned if you split it as an individual component it works fine.

What I did is to copy the folder component to my folder X. And then I imported the component right from there. Not the best way and as it is a component not the right way, but it solved the issue.

Will see if I can fix the Liebery

@r0hit5292
Copy link
Author

Hi,

same here. As you mentioned if you split it as an individual component it works fine.

What I did is to copy the folder component to my folder X. And then I imported the component right from there. Not the best way and as it is a component not the right way, but it solved the issue.

Will see if I can fix the Liebery

have to tried it?

@disha1202
Copy link

I think this issue is because vue-drag-resize does not have a typescript version

It can be fixed by adding declare module 'vue-drag-resize'; in .d.ts file.

@r0hit5292
Copy link
Author

I think this issue is because vue-drag-resize does not have a typescript version

It can be fixed by adding declare module 'vue-drag-resize'; in .d.ts file.
can you explain it disha because you are talking about d.ts file which is present in node modules but what if some copy from my repo and install node modules again

@disha1202
Copy link

I think this issue is because vue-drag-resize does not have a typescript version
It can be fixed by adding declare module 'vue-drag-resize'; in .d.ts file.
can you explain it disha because you are talking about d.ts file which is present in node modules but what if some copy from my repo and install node modules again

You'll have to create a .d.ts file somewhere in your project
https://stackoverflow.com/a/49259337/16398346

@RodrigoSpinelli
Copy link

I managed to solve this error, but now I'm busy, later I can help you if you still need it

@r0hit5292
Copy link
Author

I managed to solve this error, but now I'm busy, later I can help you if you still need it
thanks
can you please explain how you managed to solve this issue?

@RodrigoSpinelli
Copy link

I managed to solve it this way, I created a root file called tsconfig.json and filled it with this information -> ' { "allowJs": true,
"noImplicitAny": false} ' and lastly i reinstalled using this command: ' npm i -s vue-drag-resize 'and it worked
image

@r0hit5292
Copy link
Author

I managed to solve it this way, I created a root file called tsconfig.json and filled it with this information -> ' { "allowJs": true, "noImplicitAny": false} ' and lastly i reinstalled using this command: ' npm i -s vue-drag-resize 'and it worked image

but if we off noimpicitAny
typescript is off in that case we are not any type error also because its mean typescipt is off

@sparrow522
Copy link

sparrow522 commented Aug 3, 2023

vue3
import VueDragResize from 'vue-drag-resize/src/components/vue-drag-resize.vue';
✌🏻

@InsHomePgup
Copy link

vue3 import VueDragResize from 'vue-drag-resize/src/components/vue-drag-resize.vue'; ✌🏻

Thank you ,it's works.

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

6 participants