When doing separate module installation, then it's "constants.php" file isn't included during Application initialization because module isn't installed yet.
This creates Fatal Error in case if classes defined in "constants.php" are used inside unit configs of this not yet installed module.
As a solution I'm proposing to add these lines:
$constants_file = FULL_PATH . '/' . $module_folder . '/constants.php';
if ( file_exists($constants_file) ) {
require_once $constants_file;
}
after these lines:
include_once(FULL_PATH . '/core/kernel/startup.php');