Merge pull request #1310 from harrellbm/develop

Add Error Catch description for node modules not found
This commit is contained in:
Luis Fernando Molina authored and GitHub committed 2021-07-19 01:28:24 -04:00
commit 0f93ec2b24
1 file changed
+6
+6
View File
@@ -16,6 +16,12 @@ process.on('uncaughtException', function (err) {
})
process.on('unhandledRejection', (reason, p) => {
// Signal user that a necissary node module is missing
if (reason.code == 'MODULE_NOT_FOUND') {
console.log("[ERROR] Node Modules not found. Running the node setup command and then restart")
console.log('[ERROR] Client -> client-> reason = ' + JSON.stringify(reason))
process.exit(1)
}
console.log('[ERROR] Client -> client-> unhandledRejection -> reason = ' + JSON.stringify(reason))
console.log('[ERROR] Client -> client-> unhandledRejection -> p = ' + JSON.stringify(p))
process.exit(1)