question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cannot use global plugins. value was undefined on the added node component

See original GitHub issue

I am trying to use my global plugins in the node added in the drawflow but the instance of it are all undefined image

This is only happening on the node so I suspect its the library. Any solution on this?

BTW, I’m using nuxt so I’m thinking if this is also a problem only in Nuxt since we pass the Vue instance on initializing the code like below this.editor = new Drawflow(this.$refs.drawflow, Vue)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
shidcorderocommented, Jul 7, 2021

changes at line 2 constructor(container, render = null, parent = null) {

added at line 34 this.parent = parent

added at line 1381 parent: this.parent,

now, the drawflow can be initialize as const editor = new Drawflow(this.$refs.drawflow, Vue, this), where this is the component context

I am not sure how to do this in Vue 3 so I’ll leave it up to you 😃

0reactions
jerosolercommented, Oct 19, 2021

Update version to 0.0.50 new method for vue3 view https://github.com/jerosoler/Drawflow/issues/274#issuecomment-946454633

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 7: Uncaught ReferenceError: global is not defined ...
When I googled it everyone says to add this (window as any).global = window; to pollyfills.ts I have done this and I still...
Read more >
scenegraph · Adobe XD Plugin Reference
Typically, you access scenegraph nodes via the selection argument that is passed to ... For other nodes, this property returns undefined and cannot...
Read more >
How to Bundle JavaScript With Rollup — Step-by-Step Tutorial
Learn how to use Rollup as a smaller, more efficient alternative to webpack and Browserify to bundle JavaScript files in this step-by-step tutorial...
Read more >
Plugins directory - Nuxt
The plugins directory contains your Javascript plugins that you want to run before instantiating the root Vue.js Application.
Read more >
How to solve "window is not defined" errors in React and Next.js
While you can't use: if (window !== undefined) { // browser code }. Because this would try to compare a non-existent variable (window)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found