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

fix(config): remove deprecation warning for --global #518

Closed
1 task done
darcyclarke opened this issue Jun 2, 2022 · 7 comments
Closed
1 task done

fix(config): remove deprecation warning for --global #518

darcyclarke opened this issue Jun 2, 2022 · 7 comments
Assignees

Comments

@darcyclarke
Copy link
Contributor

darcyclarke commented Jun 2, 2022

Summary

A mistake was made creating this issue & subsequently led to us issuing a warning that --global was being removed. For context, --global will be changing it's underlying behaivor to map to --location=global which maps with existing --location-aware commands (ie. npm config & in v9 npm exec)

Exit Criteria

  • running npm with --global should not warn users

References & Links

@wolfpackt99
Copy link

is there a work around?

@mscdex
Copy link

mscdex commented Jun 2, 2022

@wolfpackt99 Downgrade to npm v8.10.0?

@darcyclarke
Copy link
Contributor Author

darcyclarke commented Jun 2, 2022

@wolfpackt99 we're shipping a patch right now to remove the deprecation warning as we speak. (ref. npm/cli#4984)

@nlf
Copy link

nlf commented Jun 2, 2022

done! published v8.12.1 with this reversed

@nlf nlf closed this as completed Jun 2, 2022
@alexrosenfeld10
Copy link

Is this fixed for sure in 8.12.1?

-- console output produced during zsh initialization follows --

npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
❯ which npm
/Users/alexrosenfeld/.nvm/versions/node/v16.15.1/bin/npm                                                                                                                                                                                            ─╯
❯ npm --version
8.12.1
❯ which node
/Users/alexrosenfeld/.nvm/versions/node/v16.15.1/bin/node
❯ node --version
v16.15.1

@mscdex
Copy link

mscdex commented Jun 15, 2022

@alexrosenfeld10 Perhaps the npm in your zsh initialization is a different version? Does executing a global command like npm ls -g --depth=0 from your shell prompt print the deprecation warning?

@alexrosenfeld10
Copy link

@mscdex yeah, seems like you're right - the initialization must be using a different version, because after initialization that command runs w/o a warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants