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

Constant warning on node.js #17

Closed
snajjar opened this issue Dec 12, 2018 · 1 comment
Closed

Constant warning on node.js #17

snajjar opened this issue Dec 12, 2018 · 1 comment

Comments

@snajjar
Copy link

snajjar commented Dec 12, 2018

Hello,

Thank you for the hard work of bundling all of three.js into one package.
We use it daily on node.js as well as in the browser.

However, we constantly get the following warning on node.js.

It seems you are using this package in a non-browser environment. Some dependencies that depending on global window variable could not work properly.

Not that this is a high-severity problem, but we do ship node.js programs using three-full, and can not get rid of this warning, despite the fact that we got all our use cases tested. It's kind of breaking our front-end display.

I was thinking: could we move this warning in the actual examples that are relying on the window object instead of in the core three.js package? A quick grep shows that there's about 30 files using the window object (but it needs further investigations, some of theses have a "safe" try/catch usage of it).

@Itee
Copy link
Owner

Itee commented Mar 1, 2019

Yes this warning is exactly here for that purpose, warn about Three class that depends on global window object and won't work properly in node.js environment.

But like we are in node.js env i will "map" this warning only on debug mode.
So to see it turn env DEBUG=* and if not set this won't warn anymore.

@Itee Itee closed this as completed in d18988e Mar 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants