Closed
Description
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
pnpm install
./index.sh
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
Notice how realpathSync
is not called if the --experimental-specifier-resolution=node
option is set.