layout icon indicating copy to clipboard operation
layout copied to clipboard

Cannot read properties of undefined (reading 'Node')

Open khmer-chi opened this issue 7 months ago • 5 comments

when I use pixi layout with pixi react it was working but I found it has error message

it's my repo https://github.com/khmer-chi/pixi-layout-with-react-bug-report

Image

khmer-chi avatar May 26 '25 08:05 khmer-chi

StrictMode make this bug,I remove it, okay now

khmer-chi avatar May 27 '25 13:05 khmer-chi

I meet this issue too. However, we cannot remove StrictMode in production environment.

juanchaopan avatar May 29 '25 01:05 juanchaopan

Thanks for raising this issue and proving an example, really appreciate it!

I’ll take a look as soon as I can and follow up here with any updates

Zyie avatar May 29 '25 12:05 Zyie

also had this issue; after digging in the code a bit, it seems to be because a Layout is being created before yoga has been initialized. from what I understand, yoga is initialized as part of the 'LayoutSystem' extension, which is in turn loaded when Application.init is called.

the code which was requesting the Layout was before Application.init; moving it to after fixed all issues

ei-pi avatar Jul 29 '25 03:07 ei-pi

Like @ei-pi said it's when a Pixi object is constructed with a layout setting BEFORE Application.init finish.

In my case I was constructing my "scenes" at the same time as the application would initialize and "mount" them once the stage is ready.

Which worked well until I added layouts, now I would have to delay all construction until after the end of the initialization. Not a big deal bug a pretty big gotcha.

RockHornetz avatar Sep 25 '25 13:09 RockHornetz