From 10029e3dd0b6bef15daaeef0dd34494a0858599e Mon Sep 17 00:00:00 2001 From: Thilo-Alexander Ginkel Date: Fri, 4 Feb 2022 18:41:04 +0100 Subject: [PATCH] Don't terminate the server on NodeDeprecationWarning (#1185) The last AWS SDK for Javascript that supports Node 10 (v3.45.0) emits a NodeDeprecationWarning to indicate that Node 10 is no longer supported. Without this workaround, this crashes the OSD server, so it becomes impossible to interact with other AWS services from within OSD (e.g., in a custom plugin) until the Node 14 upgrade is done. Signed-off-by: Thilo-Alexander Ginkel --- src/setup_node_env/exit_on_warning.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/setup_node_env/exit_on_warning.js b/src/setup_node_env/exit_on_warning.js index a834c0acbff..b5e1e908851 100644 --- a/src/setup_node_env/exit_on_warning.js +++ b/src/setup_node_env/exit_on_warning.js @@ -31,7 +31,7 @@ */ if (process.noProcessWarnings !== true) { - var ignore = ['MaxListenersExceededWarning']; + var ignore = ['MaxListenersExceededWarning', 'NodeDeprecationWarning']; process.on('warning', function (warn) { if (ignore.includes(warn.name)) return;