[BUG] npm 7 shows links as non-absolute paths
Open
Nobody has claimed this yet.
Bug
Priority 2
Release 10.x
Release 7.x
Release 8.x
Release 9.x
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
cd into any project, run npm link.
Then run npm ls -g --depth=0.
Expected Behavior
Like npm < 7, I expect symlinks to be reported as absolute paths. Instead, they're reported as relative.
https://github.com/nvm-sh/nvm/commit/f03f69508e0981872adaf7b2a00faed602ee4bd4 is my current workaround in nvm.
Steps To Reproduce
See above.
Environment
- OS: n/a
- Node: >= 10
- npm: ^7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the behavior with npm link, then run npm ls -g --depth=0 under npm 7 and compare its output with a pre-7 npm version. The work is done when linked packages are reported as absolute paths rather than relative paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100