-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
node triggers "npm WARN config global --global
, --local
..." on every invocation of npm
#43323
Comments
Upgrade to npm 8.12.1, which removes the deprecations. There's already a PR to pull this version in. |
Updating locally with |
Does |
Must be something wrong with your environment. I extracted tarballs for both npm 8.12.0 and 8.12.1. Executing EDIT: I also tried with the 8.12.1 tarball directly from the npm package repo and it works the same as the github release (no warning) |
Okay, I figured it out.
So as a workaround, I can open a command window with elevated privileges in Edit: That workaround probably isn't a good idea because it seems that |
I'm going to close this because
|
thanks, address this issue |
Version
16.15.1
Platform
Microsoft Windows NT 10.0.19044.0 x64
Subsystem
No response
What steps will reproduce the bug?
Invoke npm, for example with
npm --version
.How often does it reproduce? Is there a required condition?
Every invocation of npm.
What is the expected behavior?
No warning.
What do you see instead?
npm WARN config global
--global
,--local
are deprecated. Use--location=global
instead.Additional information
8.10.0
(which precedes the deprecation warning) or upgrading to npm8.12.1
(which undeprecates--local
and--global
).--global
,--local
..." breaking our nightly build process. npm/cli#4989 was filed about this issue, but as (1) indicates, this is not something that comes directly from npm.So I think node
16.15.1
includes some component responsible for invoking npm on Windows that triggers the warning, and this module does not get updated if you runnpm install -g npm@latest
. I suspect that this also caused npm/cli#4945 where I found thatpackage.json
scripts did not support the new--location
parameter on Windows while using nodev16.15.0
.To fix this bug it should be enough to just update the npm-related bundles that node includes, but it would be nice if
npm install -g npm@latest
also updated the module responsible for this issue on Windows.The text was updated successfully, but these errors were encountered: