[BUG] npm link does not inform about symlinked packages to global node_modules anymore
Open
Nobody has claimed this yet.
Bug
Priority 2
Release 7.x
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
Current Behavior:
On a project with bin field in package.json, run npm link.
/path/to/project/package.json
{
"name": "@my-package/cli",
"bin": {
"my-package-cli": "./bin/cli"
}
}
/path/to/project $> npm link
up to date, audited x packages in 1s
found 0 vulnerabilities
Expected Behavior:
There's a message with files symlinked to global node_modules
/path/to/project/package.json
{
"name": "@my-package/cli",
"bin": {
"my-package-cli": "./bin/cli"
}
}
/path/to/project$> npm link
/path/to/global/node_modules/my-package-cli -> /path/to/project
up to date, audited x packages in 1s
found 0 vulnerabilities
Steps To Reproduce:
- Start a new project
/path/to/project/package.json { "name": "@my-package/cli", "version": "0.1.0", "bin": { "my-package-cli": "./bin/cli" } }/path/to/project/bin/cli #!/usr/bin/env node console.log('Hello!') - Run
npm linkfrom package directory - Expect message displaying which paths were symlinked
Environment:
- OS: macOS 10.15.7
- Node: 14.16.1
- npm: 7.11.2
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
Reproduce the issue with the package.json containing the bin mapping and the bin/cli entry point, then run npm link from the package directory. Trace the npm link command's output and verify that completion reports the paths symlinked into global node_modules.
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