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.

Red error in console when canvas is empty

See original GitHub issue

Hello, i’m having a ton of errors when i’m creating my canvas with nothing inside

Error in updated hook: "TypeError: Cannot read property 'getZIndex' of null"

found in

---> <VGroup>
...

My template is like so

<v-stage ref="stage" class="canvas" :config="configKonva">
 <v-layer ref="layer">
  <v-group :key="mainStage">
   <BlockContainer />
   <TriggerContainer />
   <CurveContainer />
  </v-group>
 </v-layer>
</v-stage>

Any ideas? It’s not blocking the execution but I have a ton of these messages in red in the console

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:19 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
lavrtoncommented, May 11, 2020

Fixed in the last version with a better error message.

index.js:27 vue-konva error: You are trying to render "test-counter" inside your component tree. Looks like it is not a Konva node. You can render only Konva components inside the Stage.
1reaction
lavrtoncommented, May 10, 2020

I see. Thanks for the demo. Such a use case is not supported. You can use only konva components.

I am going to add a better warning message.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handling red Java console errors - Undocumented Matlab
Red Java errors are sometimes displayed in the Matlab console. They can be removed or avoided in a variety of means.
Read more >
"Canvas is null" error in javascript - html - Stack Overflow
You are calling aggiornacanvas from your setTimeout , but aggiornacanvas requires a parameter - the id of your canvas element.
Read more >
Errors function in Power Apps - Power Platform - Microsoft Learn
If there are no errors, the table that Errors returns will be empty and can be tested with the IsEmpty function.
Read more >
CanvasRenderingContext2D.createImageData() - Web APIs
createImageData() method of the Canvas 2D API creates a new, blank ImageData object with the specified dimensions.
Read more >
canvas - npm
Start using canvas in your project by running `npm i canvas`. ... OS, Command ... canvas.toBuffer((err: Error|null, result: Buffer) => void, ...
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