alexcode / vue2vis

A Vuejs 2 adapter for Visjs
MIT License
217 stars 59 forks source link

Import problem with vue2vis. #16

Closed mjelecevic closed 6 years ago

mjelecevic commented 6 years ago

Hello,

when I try to import the timeline component as it says in the Readme I'm getting this error

'vue2vis' is not defined.

I tried to import it like this import Vue2Vis from 'vue2vis' and then call it with Vue2Vis.Timeline but this does not works neither.

Does anyone know the solutiong for that. Thanks!

Menighin commented 6 years ago

Have you run npm install vue2vis on your root folder? Is there any vue2vis folder inside your node_modules folder?

mjelecevic commented 6 years ago

Yes I ran that command and the node vue2vis appeared in node_modules. I tried it several times but I'm getting the same error every time. And im getting the same error 'vue2vis' is not defined.

Menighin commented 6 years ago

Have you solved it? What was the problem?

mjelecevic commented 6 years ago

Yes.

I needed to import it like so import { Timeline } from 'vue2vis' and then I needed to declare that component Vue.component('timeline', Timeline).