If an error occurs in main.js, atom-shell does not output that error but instead reports that the app is invalid.

Even when launching from the command line, any JS error occuring in main.js is internally trapped, preventing debugging. Instead, you get the following:

screenshot 2014-05-12 09 38 03

The error is not reported in the console.

1 possible answer(s) on “If an error occurs in main.js, atom-shell does not output that error but instead reports that the app is invalid.

  1. +1 This is a bug – an incorrect require statement isn’t really the same as an invalid app, which makes this error deceptive at best.

    The attached commit seems to just manually detect when a module isn’t found and then still throw the same error, regardless. Is there something I’m missing? It seems like what you want to detect is if one of the key modules is missing (ie main.js), but this looks to report the same error regardless of which require statement goes wrong.

    Absent of a more in-depth solution, could the error message be modified to mention require statements in some way? This can be a pain in the neck to debug if you don’t already know that a script error can trigger this.