-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
experimental-specifier-resolution=node
doesn't resolve realpath
#42195
Labels
loaders
Issues and PRs related to ES module loaders
Comments
sxa
pushed a commit
to sxa/node
that referenced
this issue
Mar 7, 2022
Fix: nodejs#42195 PR-URL: nodejs#42197 Fixes: nodejs#42195 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
danielleadams
pushed a commit
to danielleadams/node
that referenced
this issue
Apr 21, 2022
Fix: nodejs#42195 PR-URL: nodejs#42197 Fixes: nodejs#42195 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
xtx1130
pushed a commit
to xtx1130/node
that referenced
this issue
Apr 25, 2022
Fix: nodejs#42195 PR-URL: nodejs#42197 Fixes: nodejs#42195 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
shanedg
added a commit
to shanedg/trshcmpctr
that referenced
this issue
Jun 21, 2022
Bug in `--experimental-specifier-resolution=node` fixed in ^16.15.0 See: nodejs/node#42195
shanedg
added a commit
to shanedg/trshcmpctr
that referenced
this issue
Jun 21, 2022
Bug in `--experimental-specifier-resolution=node` fixed in ^16.15.0 See: nodejs/node#42195
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
v17.6.0
Platform
Darwin VMBP2021.local 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:41 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T6000 arm64
Subsystem
esm resolver
What steps will reproduce the bug?
https://github.com/vjpr/issue-node-experimental-specifier-resolution
How often does it reproduce? Is there a required condition?
Pnpm relies on realpaths. Package managers relying on hoisting will not encounter this issue as they will eventually find the package hoisted.
This is why it was probably hard to detect.
What is the expected behavior?
Realpath should be called when
--experimental-specifier-resolution=node
is set.What do you see instead?
It's not being called, and modules are resolved using logical paths.
Additional information
https://github.com/nodejs/node/blame/e5c1fd7a2a1801fd75bdde23b260488e85453eb2/lib/internal/modules/esm/resolve.js#L367-L410
Notice how
realpathSync
is not called if the--experimental-specifier-resolution=node
option is set.The text was updated successfully, but these errors were encountered: