Skip to content

trace-deps: Handle pnpm style of hard/soft links. #19

@ryan-roemer

Description

@ryan-roemer

trace-deps can't handle seemingly simple pnpm deps because presumably the mix of hard and soft links.

WIP Branch

main...bug/pnpm

Example

For example, a package @remix-run/node with prod dep abort-controller ends up with a trace error of:

ERROR Error: Encountered resolution error in /PATH/TO/project/node_modules/@remix-run/node/dist/index.js for abort-controller: Error: Cannot find module 'abort-controller' from '/PATH/TO/project/node_modules/@remix-run/node/dist'

where the real module is at:

node_modules/.pnpm/@[email protected]_biqbaboplfbrettd7655fr4n2y/

although on disk we have these symlinks:

node_modules/.pnpm/node_modules/abort-controller
node_modules/.pnpm/@[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/abort-controller

that point to:

node_modules/.pnpm/[email protected]/node_modules/abort-controller

which exists and has the necessary files.

Tasks

  • Come up with failing unit test using analogous symlinks and such
  • Fix the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions