luma.gl icon indicating copy to clipboard operation
luma.gl copied to clipboard

luma.gl Reference error: window is not defined

Open mplatt212 opened this issue 3 years ago • 2 comments

One of the tasks for my current project is trying to find the source of the following console error:

image

I have looked through all the references to the window object as well as the luma.gl library but can't seem to find where the issue is originating. It doesn't seem to break anything but is more of an annoyance when debugging as it pops up over 20 times in a row whenever the page is refreshed. Here are the versions of Deck.gl and Luma.gl from package.json:

image

Just want to know if anyone has encountered this before and how you might have fixed it. Thank you.

I have eliminated all calls to the window object within the project to no avail and have looked through polyfill-context.js inside the @luma.gl library with no luck either.

mplatt212 avatar Nov 07 '22 21:11 mplatt212

Not sure if this helps but per the stack trace (chunk-....js) you seem to have some hot reloader that is probably doing "clever things" with your run-time environment. You are also pinning @luma.gl/core but not immediately clear what version of @luma.gl/gltools ends up being pulled in. yarn why @luma.gl/gltools or npm ls @luma.gl/gltools may shed some light on that - since that is where the error is being reported.

ibgreen avatar Nov 07 '22 21:11 ibgreen

@ibgreen I'm showing 3 installations of gltools. This shouldn't be an issue since they're the same version I wouldn't think. I haven't explicitly added @luma.gl in my package.json so I assume deck.gl is bringing those in. image

mplatt212 avatar Nov 09 '22 14:11 mplatt212

Closing as cause unclear and gltools module has been removed in v9.

ibgreen avatar Mar 29 '24 17:03 ibgreen