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: open
- Created 2 years ago
- Reactions: 41
- Comments: 17
Commits related to this issue
- fix: fix link global, fix #4761 — committed to spencer17x/pnpm by spencer17x 2 years ago
- fix: linking globally a package with no name in package.json close #4761 close #4793 — committed to pnpm/pnpm by zkochan 5 months ago
- fix: linking globally a package with no name in package.json (#7637) close #4761 close #4793 — committed to pnpm/pnpm by zkochan 5 months ago
- fix: linking globally a package with no name in package.json (#7637) close #4761 close #4793 — committed to pnpm/pnpm by zkochan 5 months ago
@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 having the same problem on
pnpm 8.9.2
This is a workaround
Still happening in
8.15.5
This 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