Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] "install -g" as user warns to late #7426

Closed
2 tasks done
buhtz opened this issue Apr 26, 2024 · 2 comments
Closed
2 tasks done

[BUG] "install -g" as user warns to late #7426

buhtz opened this issue Apr 26, 2024 · 2 comments
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 9.x work is associated with a specific npm 9 release

Comments

@buhtz
Copy link

buhtz commented Apr 26, 2024

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

Executing $ npm install -g <package> warns about that there are not enough permissions. Make sense because I am user not root.

The problem is that this warnings comes to late. There is a lot of downloading going on wasting time and resources (and carbon dioxid) before this warning comes up. I assuming npm can realize a bit more early that the requested job (install -g) is not possible in the current (user) environment.

Expected Behavior

Warn much earlier before wasting to much ressources.

Steps To Reproduce

See above.

Environment

  • npm: 9.2.0
  • Node.js: Don't know this component.
  • OS Name: Debian GNU/Linux 12 (bookworm)
  • System Model Name: What do you mean?
  • npm config: Debian default, don't know details
; "builtin" config from /usr/share/nodejs/npm/npmrc

globalignorefile = "/etc/npmignore"
prefix = "/usr/local"

; node bin location = /usr/bin/node
; node version = v18.19.0
; npm local prefix = /home/user
; npm version = 9.2.0
; cwd = /home/user
; HOME = /home/user
; Run `npm config ls -l` to show all defaults.
@buhtz buhtz added Bug thing that needs fixing Needs Triage needs review for next steps Release 9.x work is associated with a specific npm 9 release labels Apr 26, 2024
@wraithgar
Copy link
Member

This is more of a feature request than a bug report. General feedback is at https://github.com/npm/feedback/discussions.

@buhtz
Copy link
Author

buhtz commented Apr 26, 2024

Yes it is a feature request improving usability and sustainability of npm. Why closing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 9.x work is associated with a specific npm 9 release
Projects
None yet
Development

No branches or pull requests

2 participants