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

Unable to import into Vue3 #33

Closed
zhangj1an opened this issue Oct 3, 2021 · 2 comments
Closed

Unable to import into Vue3 #33

zhangj1an opened this issue Oct 3, 2021 · 2 comments

Comments

@zhangj1an
Copy link

Hi,

I come across this plugin and it is very easy to understand the usage.

I installed this plugin for my Vue3 project using

npm install vue3-draggable-resizable

The install step is successful.
Then I import it into my main.js . My main.js script looks like this:

import { createApp } from 'vue'
import App from './App.vue'
import Vue3DraggableResizable from 'vue3-draggable-resizable'
//default styles
import 'vue3-draggable-resizable/dist/Vue3DraggableResizable.css'
createApp(App).use(Vue3DraggableResizable).mount('#app')

I then run npm run serve in terminal. But I encountered this error:

 ERROR  Failed to compile with 2 errors                                                                                                     1:12:56 AM

These relative modules were not found:

* ./components/DraggableContainer in ./node_modules/vue3-draggable-resizable/src/index.js
* ./components/Vue3DraggableResizable in ./node_modules/vue3-draggable-resizable/src/index.js

Is there a way to solve this? Thanks!
Feel free ask for more info if you cannot replicate this error.

@zhangj1an
Copy link
Author

It might be because I never install a TypeScript loader.

@zhangj1an
Copy link
Author

I installed typescript using
vue add typescript
and everything runs now.

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

1 participant