Skip to content

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

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/@remix-run+node@1.7.1_biqbaboplfbrettd7655fr4n2y/

although on disk we have these symlinks:

node_modules/.pnpm/node_modules/abort-controller
node_modules/.pnpm/@remix-run+node@1.7.1_biqbaboplfbrettd7655fr4n2y/node_modules/abort-controller

that point to:

node_modules/.pnpm/abort-controller@3.0.0/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

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions