Skip to content

fix: don't print the funding message for global installs - #9927

Merged
reggi merged 1 commit into
release/v11from
backport/v11/9864
Aug 28, 2026
Merged

fix: don't print the funding message for global installs#9927
reggi merged 1 commit into
release/v11from
backport/v11/9864

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Backport of #9864 to release/v11.

## What / Why

A global install prints "N packages are looking for funding / run `npm
fund` for details", but nothing can be done with it. `npm fund -g` fails
with `EFUNDGLOBAL`, and a bare `npm fund` loads the tree at the local
prefix, so outside a project it prints the directory name and nothing
else.

`packagesFundingMessage` in `lib/utils/reify-output.js` never looked at
`npm.global`, so the hint went out for global installs too. It now
returns early in that case. Making `npm fund -g` work is a separate
feature request; #3112 already splits it out that way.

## Testing

New case in `test/lib/utils/reify-output.js`, mirroring the existing
`fund: false` one: with `global: true` the output no longer mentions
funding. It fails without the change.

## References

Fixes #9863
Fixes #3112

(cherry picked from commit 51c2bf8)
@reggi
reggi merged commit f28cca9 into release/v11 Aug 28, 2026
37 checks passed
@reggi
reggi deleted the backport/v11/9864 branch August 28, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants