rcarcasses / vue-cytoscape

cytoscape.js now inside vue.js
https://rcarcasses.github.io/vue-cytoscape
MIT License
94 stars 34 forks source link

Errors while using example code in nuxt #35

Closed peterclemenko closed 4 years ago

peterclemenko commented 4 years ago

I'm trying to use the example code in nuxt from codepen and I'm having errors pop up in the console and it's refusing to render the graph. I have no idea what's going wrong here.

The errors are [Vue warn]: Injection "cy" not found

found in

---> <Pages\knowledgegraph.vue> at pages\knowledgegraph.vue

at layouts\default.vue [Vue warn]: Error in data(): "TypeError: Cannot read property 'then' of undefined" found in ---> at pages\knowledgegraph.vue at layouts\default.vue TypeError: Cannot read property 'then' of undefined at new CyElement
peterclemenko commented 4 years ago

This is the code https://gist.github.com/aoighost/635cc22493fedf1fea79eda82cdd898d

rcarcasses commented 4 years ago

Hi @aoighost, thanks for pointing this out. I'm not sure why this happens neither, but seems like a real issue, I'll keep it in mind. I'll let you know if I find a solution.

joshdvir commented 4 years ago

Faced the same issue today using Vue 2.6.6, upgrade to Vue 2.6.10 solved it.

peterclemenko commented 4 years ago

So upgrading to nuxt and vue latest, I now get errors on starting with the following:

3:21 error Parsing error: Unexpected token
1 |