Open patreeceeo opened 6 months ago
Why do you want to do this in an interactive shell?
In my case, for automated testing.
To clarify, the issue isn't only in the Node CLI/interactive shell. It's in any Node context. Besides automated tests, library users may want to SSR.
I think the argument could also be made it's a general usability issue when a module is written such that it assumes and creates a hard dependency on a certain environment at import time?
In general, Pixi3D has not been created to be imported in any environment. If you want to dig deeper and provide a solution I'm happy to accept a PR.
Btw, Pixi3D itself has automated tests. Maybe you can have a look at those and see how it works?
Steps to reproduce
node
interactive shellStack trace
What I expected
It can be imported in Node without crashing. What I've read on in this project's discussions leads me to believe this should be possible.