summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/internal/modules/esm/module_job.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/internal/modules/esm/module_job.js b/lib/internal/modules/esm/module_job.js
index fbb29aef78..e3fb91ca6f 100644
--- a/lib/internal/modules/esm/module_job.js
+++ b/lib/internal/modules/esm/module_job.js
@@ -6,6 +6,8 @@ const { decorateErrorStack } = require('internal/util');
const assert = require('assert');
const resolvedPromise = SafePromise.resolve();
+function noop() {}
+
/* A ModuleJob tracks the loading of a single Module, and the ModuleJobs of
* its dependencies, over time. */
class ModuleJob {
@@ -41,6 +43,9 @@ class ModuleJob {
};
// Promise for the list of all dependencyJobs.
this.linked = link();
+ // This promise is awaited later anyway, so silence
+ // 'unhandled rejection' warnings.
+ this.linked.catch(noop);
// instantiated == deep dependency jobs wrappers instantiated,
// module wrapper instantiated