Node uses the real path of modules (except when executed with --preserve-symlinks) to resolve dependencies. That is why pnpm's symlinked node_modules work fine with Node applications.
However, resolve is a really popular and widely used package and it does not use the real path of modules to resolve dependencies. As a consequence, a lot of tooling fails with pnpm. See the most recent issue: pnpm/pnpm#857. And also many of these might be related: pnpm/pnpm#801
Would you accept a pull request to change the behavior of resolve to work the way Node does? It won't change anything for projects that use npm/Yarn because they don't leverage symlinks but it would be a huge help for the pnpm community!
Node uses the real path of modules (except when executed with
--preserve-symlinks) to resolve dependencies. That is why pnpm's symlinkednode_moduleswork fine with Node applications.However,
resolveis a really popular and widely used package and it does not use the real path of modules to resolve dependencies. As a consequence, a lot of tooling fails with pnpm. See the most recent issue: pnpm/pnpm#857. And also many of these might be related: pnpm/pnpm#801Would you accept a pull request to change the behavior of
resolveto work the way Node does? It won't change anything for projects that use npm/Yarn because they don't leverage symlinks but it would be a huge help for the pnpm community!