FormidableLabs / FormidableLabs/tracing
trace-deps: Handle pnpm style of hard/soft links.
- Dominant language
- JavaScript
- Stars
- 6
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
`trace-deps` can't handle seemingly simple pnpm deps because presumably the mix of hard and soft links.
## WIP Branch
https://github.com/FormidableLabs/tracing/compare/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.
Contributor guide
Assessment
This issue has not been assessed yet.