-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
node >=17: experimental esm loader doesnt respect --experimental-specifier-resolution=node #41321
Comments
not sure if this matters, but here is the relevant section of my pkg json "exports": {
".": {
"import": "./src/index.mjs",
"default": "./dist/index.js"
},
"./t": {
"import": "./src/t.mjs",
"default": "./dist/t.js"
}
}, this is the line in the esm loader that throws the err if (!isFlow) return isCjs
? { format, source: rawSource }
: defaultLoad(url, { format }); <--- this procedure |
/cc @nodejs/loaders |
Need loader source text
…On Sat, Dec 25, 2021, 11:32 AM Antoine du Hamel ***@***.***> wrote:
/cc @nodejs/loaders <https://github.com/orgs/nodejs/teams/loaders>
—
Reply to this email directly, view it on GitHub
<#41321 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABZJIYAYZOYIERHGF6KYCTUSX5ZLANCNFSM5KXX5NKA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are on a team that was mentioned.Message
ID: ***@***.***>
|
still broken in 17.4 in
console log poop@spaceship:~/git/foss/nodeproto/packages/libraries/testproto
10:48 AM (rework-testproto *$=)
$ pnpm repo:test
> @nodeproto/testproto@0.0.0 repo:test /home/poop/git/foss/nodeproto/packages/libraries/testproto
> NODE_OPTIONS="$npm_package_config_NODE_OPTIONS" uvu ./src "test.(m|c)?js"
(node:614409) ExperimentalWarning: --experimental-loader is an experimental feature. This feature could change at any time
at emitExperimentalWarning (node:internal/util:224:11)
at initializeLoader (node:internal/process/esm_loader:59:3)
at loadESM (node:internal/process/esm_loader:87:11)
at runMainESM (node:internal/modules/run_main:51:21)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:74:5)
at node:internal/main/run_main_module:17:47
TypeError [ERR_INVALID_FILE_URL_HOST]: File URL host must be "localhost" or empty on linux
at __node_internal_captureLargerStackTrace (node:internal/errors:464:5)
at new NodeError (node:internal/errors:371:5)
at getPathFromURLPosix (node:internal/url:1459:11)
at fileURLToPath (node:internal/url:1482:50)
at toPathIfFileURL (node:internal/url:1561:10)
at __node_internal_ (node:internal/fs/utils:681:16)
at statSync (node:fs:1531:10)
at fileExists (node:internal/modules/esm/resolve:260:10)
at resolveExtensions (node:internal/modules/esm/resolve:335:9)
at resolveExtensionsWithTryExactName (node:internal/modules/esm/resolve:322:10)
at finalizeResolution (node:internal/modules/esm/resolve:375:16)
at moduleResolve (node:internal/modules/esm/resolve:944:10)
at defaultResolve (node:internal/modules/esm/resolve:1041:11)
at ESMLoader.resolve (node:internal/modules/esm/loader:530:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:251:18)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:79:40)
at link (node:internal/modules/esm/module_job:78:36)
(node:614409) WARNING: Exited the environment with code 1
at exit (node:internal/process/per_thread:194:13)
at /home/poop/git/foss/nodeproto/node_modules/.pnpm/uvu@0.5.3/node_modules/uvu/bin.js:32:12
ELIFECYCLE Command failed with exit code 1.
poop@spaceship:~/git/foss/nodeproto/packages/libraries/testproto
10:49 AM (rework-testproto *$=)
$
|
Seems to still be broken in v18.0 |
The plan is to remove Therefore, this issue is unlikely to be fixed unless it can be demonstrated to have wider implications than behavior under |
|
Version
17.3.0
Platform
Linux spaceship 5.13.0-22-generic #22-Ubuntu SMP Fri Nov 5 13:21:36 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
loaders, experimental node options
What steps will reproduce the bug?
esm loader works under the following conditions
esm loader fails under the following conditions
How often does it reproduce? Is there a required condition?
everyday, except sundays. thats the lords day
What is the expected behavior?
i can use experimental loader + experimental specifier resolution because Ive spent many days reading the nodejs docs, and the nodejs docs never lie
What do you see instead?
Additional information
The text was updated successfully, but these errors were encountered: