We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8cf0478 commit d805592Copy full SHA for d805592
lib/internal/modules/esm/module_job.js
@@ -327,12 +327,9 @@ class ModuleJob extends ModuleJobBase {
327
if (status === kUninstantiated) {
328
// FIXME(joyeecheung): this cannot fully handle < kInstantiated. Make the linking
329
// fully synchronous instead.
330
- if (this.module.getModuleRequests().length > 0) {
331
- const filename = urlToFilename(this.url);
332
- const parentFilename = urlToFilename(parent?.filename);
333
- throw new ERR_REQUIRE_ASYNC_MODULE(filename, parentFilename);
+ if (this.module.getModuleRequests().length === 0) {
+ this.module.link([]);
334
}
335
- this.module.link([]);
336
this.module.instantiate();
337
status = this.module.getStatus();
338
0 commit comments