Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: TypeError: Cannot read properties of null (reading 'stage') #472

Open
Brandon-Perry opened this issue Jan 24, 2024 · 1 comment
Open
Labels
v7 Issues related to Pixi React v7

Comments

@Brandon-Perry
Copy link

Brandon-Perry commented Jan 24, 2024

Current Behavior

If I make a Pixi component and use it in my NextJS app, it causes this error to appear:
Unhandled Runtime Error
TypeError: Cannot read properties of null (reading 'stage')

This will happen even if Stage is the only Pixie React component.

I've made sure that it as a client component and I've also tried using dynamic imports. Neither worked.

I tried reproducing it in a code sandbox, but there it actually worked! It's the exact same code, so I don't know what the issue is.

Expected Behavior

It not to immediately crash

Steps to Reproduce

https://codesandbox.io/p/devbox/pixinext-issue-spxnsl
Note that this works

Steps for my local version that didn't work:

  • Run npx create-next-app@latest in dir
  • Select default options
  • Install latest versions of Pixi and React Pixi
  • Create any Pixi component and place it in app/page.tsx. Make sure it's a client component (add 'use client' to top of page)
  • Run npm run dev
  • Failure?

Environment

Possible Solution

No response

Additional Information

No response

@trezy trezy added v7 Issues related to Pixi React v7 bug Something isn't working labels Jun 15, 2024
@braveltd
Copy link

same problem here

@trezy trezy removed the bug Something isn't working label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v7 Issues related to Pixi React v7
Projects
None yet
Development

No branches or pull requests

3 participants