You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error [ERR_INTERNAL_ASSERTION]: This is caused by either a bug in Node.js or incorrect usage of Node.js internals. #54773
at assert (node:internal/assert:14:11)
at ModuleLoader.getModuleJobForRequire (node:internal/modules/esm/loader:329:5)
at new ModuleJobSync (node:internal/modules/esm/module_job:313:34)
at ModuleLoader.importSyncForRequire (node:internal/modules/esm/loader:314:11)
at loadESMFromCJS (node:internal/modules/cjs/loader:1381:24)
at Module._compile (node:internal/modules/cjs/loader:1503:5)
at Module._extensions..js (node:internal/modules/cjs/loader:1691:10)
at Module.load (node:internal/modules/cjs/loader:1317:32)
at Module._load (node:internal/modules/cjs/loader:1127:12)
at TracingChannel.traceSync (node:diagnostics_channel:315:14) {
code: 'ERR_INTERNAL_ASSERTION'
}
Subsystem
No response
What steps will reproduce the bug?
at assert (node:internal/assert:14:11)
at ModuleLoader.getModuleJobForRequire (node:internal/modules/esm/loader:329:5)
at new ModuleJobSync (node:internal/modules/esm/module_job:313:34)
at ModuleLoader.importSyncForRequire (node:internal/modules/esm/loader:314:11)
at loadESMFromCJS (node:internal/modules/cjs/loader:1381:24)
at Module._compile (node:internal/modules/cjs/loader:1503:5)
at Module._extensions..js (node:internal/modules/cjs/loader:1691:10)
at Module.load (node:internal/modules/cjs/loader:1317:32)
at Module._load (node:internal/modules/cjs/loader:1127:12)
at TracingChannel.traceSync (node:diagnostics_channel:315:14) {
code: 'ERR_INTERNAL_ASSERTION'
}
How often does it reproduce? Is there a required condition?
Fisrt time
What is the expected behavior? Why is that the expected behavior?
As it currently stands, your issue lacks enough information to be easily reproduced. Please edit your issue to include additional information, such as specific (minimal) code snippets that will allow this issue to be easily reproduced.
This issue/PR was marked as stalled, it will be automatically closed in 30 days. If it should remain open, please leave a comment explaining why it should remain open.
Hey, I've marked this issue as stalled (though that bot doesn't appear to work), just so collaborators know that this issue is waiting for more information.
That function should only be used if the option is turned on in the first place (otherwise it should’ve gone elsewhere to throw ERR_REQUIRE_ESM instead of going into this function), I am not sure whether that solves anything without more information of the repro
Activity
avivkeller commentedon Sep 4, 2024
As it currently stands, your issue lacks enough information to be easily reproduced. Please edit your issue to include additional information, such as specific (minimal) code snippets that will allow this issue to be easily reproduced.
github-actions commentedon Sep 5, 2024
This issue/PR was marked as stalled, it will be automatically closed in 30 days. If it should remain open, please leave a comment explaining why it should remain open.
avivkeller commentedon Sep 5, 2024
Hey, I've marked this issue as
stalled(though that bot doesn't appear to work), just so collaborators know that this issue is waiting for more information.aduh95 commentedon Sep 5, 2024
@joyeecheung wdyt? Should we replace the
elsewithelse if (getOptionValue('--experimental-require-module'))innode/lib/internal/modules/cjs/loader.js
Lines 1377 to 1381 in 0301309
joyeecheung commentedon Sep 5, 2024
That function should only be used if the option is turned on in the first place (otherwise it should’ve gone elsewhere to throw ERR_REQUIRE_ESM instead of going into this function), I am not sure whether that solves anything without more information of the repro
avivkeller commentedon Sep 5, 2024
@Mongsplaatjies can you provide a minimal reproducible example of the code that caused this error?
For reference, the failing assertion is:
node/lib/internal/modules/esm/loader.js
Line 329 in 0debdac
aduh95 commentedon Sep 9, 2024
I'm able to reproduce thanks to @dgozman with the following script:
esm: throw `ERR_REQUIRE_ESM` instead of `ERR_INTERNAL_ASSERTION`
esm: throw `ERR_REQUIRE_ESM` instead of `ERR_INTERNAL_ASSERTION`
esm: throw `ERR_REQUIRE_ESM` instead of `ERR_INTERNAL_ASSERTION`
esm: throw `ERR_REQUIRE_ESM` instead of `ERR_INTERNAL_ASSERTION`