tadasajon
tadasajon

Reputation: 14856

Meteor.js - randomly everything is 'undefined' -- why?

So I'm working on my Meteor project and all of a sudden everything stops working and my console reports that everything is 'undefined'. See screenshot. Why does this happen? Usually things will just randomly start working again after I reboot my machine or go get lunch. enter image description here

Upvotes: 1

Views: 100

Answers (1)

Tarang
Tarang

Reputation: 75955

This can happen if you have a hot code reload during when the page is loading from a previous hot code reload.

Your browser will eventually reconnect to the server, reconnect & refresh the page. In the case above it looks the the bit of Js that connects to the server doesn't get loaded to begin with (the DDP bit) so it doesn't behave as normal. If it reconnects it can fix it self by refreshing.

It's very hard to tell what exactly is causing it from the information you've given. I'd look at custom packages that replace core packages or some kind of of package you have that runs early on in your code that would stop the normal loading of a project.

If you're using meteor on windows there are a couple of bugs that do this too. I'm not sure how to get past those besides doing Ctrl+C to stop and then using meteor to start the project again.

Upvotes: 1

Related Questions