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
Importing module: file:///E:\My\Path\module.mjs
node:internal/process/promises:394
triggerUncaughtException(err, true /* fromPromise */);
^
TypeError [ERR_INVALID_RETURN_PROPERTY_VALUE]: Expected undefined or a fully resolved URL string to be returned for the "responseURL" from the "node:internal/modules/esm/load 'load'" hook but got type string ('file:///...').
at Hooks.load (node:internal/modules/esm/hooks:412:13)
at async MessagePort.handleMessage (node:internal/modules/esm/worker:199:18) {
code: 'ERR_INVALID_RETURN_PROPERTY_VALUE'
}
Node.js v22.11.0
With versions older than v1.10.0, the result is expected:
Description
@swc-node/register
fails to import module with file URL sincev1.10.0
.Reproduction
Minimal reproduction example with the following files:
Content of
test.ts
:Content of
module.mjs
:Run the
test.ts
file, using this command:Result
With versions older than
v1.10.0
, the result is expected:The text was updated successfully, but these errors were encountered: