Revice src/compiler.js to try process.exit() only if running in node. Make the compiler error more user friendly along the lines of #2497.