pnpm: pnpm link --global for a dependency with a bin prints unexpected warning
pnpm version 7.1.1
Take a project with a simple file at bin/command.mjs
#!/usr/bin/env node
console.log("hello world");
Configure it via the bin field of that project’s package.json file.
"bin": { "myCommand": "./bin/command.mjs" }
Install this local project globally.
pnpm link --global
Unexpected output:
WARN undefined has no binaries
The associated bin file is available as expected despite this warning.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 48
- Comments: 25 (2 by maintainers)
Commits related to this issue
- fix: linking globally a package with no name in package.json close #4761 close #4793 — committed to pnpm/pnpm by zkochan 3 years ago
- fix: linking globally a package with no name in package.json (#7637) close #4761 close #4793 — committed to pnpm/pnpm by zkochan 3 years ago
- fix: linking globally a package with no name in package.json (#7637) close #4761 close #4793 — committed to pnpm/pnpm by zkochan 3 years ago
- fix: don't print a warning when printing packages globally close #4761 — committed to pnpm/pnpm by zkochan 2 years ago
- fix: don't print a warning when printing packages globally (#8529) close #4761 — committed to johnny-rice/pnpm by zkochan 2 years ago
Still happening in 9.1.1
@zkochan I tested this on v8.15.2 and it doesn’t seem to be fixed. I’m still seeing the same warning as before. In my case it prints:
I’m using workspaces, my package has a name and it’s private. Maybe this helps debug the issue further.
Still happening in 9.7.1. Apologies for the +1, this is relatively urgent for me.
Still having the same problem on
pnpm 8.9.2This is a workaround
although I unlinked the package from the list, the package was visible . so uninstalling and linking it again does not give an error https://pnpm.io/cli/unlink
check it
pnpm list --globaluninstall
pnpm uninstall --global <package>link again
pnpm link --globalStill happening in
8.15.5This is STILL happening, and has been happening for close to a year now. This hinders the development of local cli tools in NodeJS.
same problem 💢
Same issue. Latest pnpm 8.10.0 and node 20.9.0 w/ npm 10.1.0
🚢 9.11
yep. 9.10 released on Sep 9, 2024. fix done on Sep 16, 2024. so no release with fix yet.