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
❯ node -e 'import("https://example.com")'
node:internal/errors:463
ErrorCaptureStackTrace(err);
^
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader. Received protocol 'https:'
at new NodeError (node:internal/errors:370:5)
at Loader.defaultResolve [as _resolve] (node:internal/modules/esm/resolve:839:11)
at Loader.resolve (node:internal/modules/esm/loader:89:40)
at Loader.getModuleJob (node:internal/modules/esm/loader:242:28)
at Loader.import (node:internal/modules/esm/loader:177:28)
at importModuleDynamically (node:internal/process/execution:87:29)
at async importModuleDynamicallyWrapper (node:internal/vm/module:437:15) {
code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'
}
With source-map-support the output is modified in ways that I think should be considered a bug.
For example, [ERR_UNSUPPORTED_ESM_URL_SCHEME] is omitted:
❯ node --require source-map-support/register -e 'import("https://example.com")'
Error: Only file and data URLs are supported by the default ESM loader. Received protocol 'https:'
at new NodeError (node:internal/errors:370:5)
at Loader.defaultResolve [as _resolve] (node:internal/modules/esm/resolve:839:11)
at Loader.resolve (node:internal/modules/esm/loader:89:40)
at Loader.getModuleJob (node:internal/modules/esm/loader:242:28)
at Loader.import (node:internal/modules/esm/loader:177:28)
at importModuleDynamically (node:internal/process/execution:87:29)
at importModuleDynamicallyWrapper (node:internal/vm/module:437:15)
This is not the same as #263, although anyone who attempts this reproduction will notice the lack of colored output.
The text was updated successfully, but these errors were encountered:
Related to TypeStrong/ts-node#1403
On the new node 16.5, important information is being omitted from uncaught error output.
From vanilla node:
With source-map-support the output is modified in ways that I think should be considered a bug.
For example,
[ERR_UNSUPPORTED_ESM_URL_SCHEME]
is omitted:This is not the same as #263, although anyone who attempts this reproduction will notice the lack of colored output.
The text was updated successfully, but these errors were encountered: