I’m able to ‘successfully’ build a globe.gl app, but when trying to see it running, I get a “window is not defined” error. I have tried a lot of options, but no success. Any advice?
==> Running ‘node dist/globe.gl.mjs’
var THREE = window.THREE ? window.THREE // Prefer consumption from global THREE, if exists
ReferenceError: window is not defined
window on the server-side.
Thanks, Alan! Apologies for the delay in answering, as I was away on vacation.
I confess this is my first try with Node and Globe.gl, so I appreciate your clear answer and patience. So far, everything seems to run perfectly on my local computer, but not on Render. I included this html file (just renamed it “index.html” in case that was the issue) but still nothing.
Perhaps there’s something I need to add to the file? Again, just like that it runs without issues on my local computer, but perhaps Render needs something extra?
Thanks for your advice
If you want to serve a file with a Web Service you need to use a web server to serve those files. I mentioned that in my last message:
Render Web Services expect an HTTP server to be started in the Start Command (Express, being commonly used in Node).
If you just want to serve just static files, you may be able to use a Static Site
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.