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

npm deprecated --global #824

Closed
tchari opened this issue Jun 30, 2022 · 2 comments
Closed

npm deprecated --global #824

tchari opened this issue Jun 30, 2022 · 2 comments

Comments

@tchari
Copy link

tchari commented Jun 30, 2022

Issue:
This may not be the correct repository for this issue, however, after installing the latest nodejs LTS (16.15.1) I'm getting this warning:
config global `--global`, `--local` are deprecated. Use `--location=global` instead
when using npm.

Somewhere the npm and npm.cmd files that are created include stuff like:
NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g

I don't know how these files are created or who is responsible so this repo may not the right place.

How To Reproduce:

  1. Install NVM
  2. nvm install 16.15.1
  3. npm --version (8.11.0)

Expected Behavior:
For no deprecation warnings to appear.

Desktop:

  • OS: Windows 11, PowerShell terminal
@ohiobobcat
Copy link

ohiobobcat commented Jun 30, 2022

This is an npm issue not an nvm issue. You didn't show your version of NPM but i'd bet you're using v8.11.

Here's the link to the fix implemented in v8.12

npm/cli#4982

@tchari
Copy link
Author

tchari commented Jun 30, 2022

Yes you are correct, it's 8.11.0. I figured it probably wasn't an nvm issue. Is this just the npm version that node 18.15.1 bundles?

@tchari tchari closed this as completed Jun 30, 2022
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

No branches or pull requests

2 participants