Modifying client files restarts server


I have a Meteor 1.4.1 app, it’s fully build with meteor packages, each of them having a main module for both client and server.

If I edit any client file, the entire server restarts (instead of just updating the client). So I’m suspecting this is either a meteor bug (but I can’t seem to create a small reproduction) or somewhere in the import tree I’m importing a client file on my server, and this causes the entire server to restart.

Since I can’t seem to create a small reproduction, I’m suspecting it’s the latter problem. However, I can’t seem to locate where the wrong import would be.
Is there a way to know why a file change causes a server restart? I mean, I could probably debug meteor-tool to find out this information, but meteor-tool is quite complex and I don’t know where to start looking…

Anyone has any ideas?


What does your application structure look like? Is it like the one proposed in the guide? If so, you could try to change /ui to /client.


Nope, it’s completely package based.
So it’s like:

  package 2 

With the package.js files having just main modules specified, like:

 api.mainModule('client/main.js', 'client');
 api.mainModule('server/main.js', 'server');

So I suspect that somewhere in the import path of a server/main.js file, there is an import of a top-level client file which causes any client file change to trigger a server restart.
But then again, my entire client is written in angular 1, which would give errors if I imported it on the server (like window is not defined or something like that).


Okay, nevermind. This line: made me realize I had forgotten to include the autoupdate package, which is required for client-side refreshes.