From 367cb980beff8cdaaf2ed1e3148a578e333d31ce Mon Sep 17 00:00:00 2001 From: Brenden Harrell Date: Sun, 18 Jul 2021 21:21:28 -0500 Subject: [PATCH 1/2] Add Error Catch description for node modules not found --- Client/client.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Client/client.js b/Client/client.js index 99992d338..117ad3469 100644 --- a/Client/client.js +++ b/Client/client.js @@ -16,6 +16,11 @@ process.on('uncaughtException', function (err) { }) process.on('unhandledRejection', (reason, p) => { + 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) From c44f140927a6f8c7d28d7c7d24d963cb954d58d7 Mon Sep 17 00:00:00 2001 From: Brenden Harrell Date: Sun, 18 Jul 2021 22:01:30 -0500 Subject: [PATCH 2/2] Add code note --- Client/client.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Client/client.js b/Client/client.js index 117ad3469..e7a1a1c4c 100644 --- a/Client/client.js +++ b/Client/client.js @@ -16,6 +16,7 @@ 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))