<h3 dir="auto">Is there an existing issue for this?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the existing issues</li>
</ul>
<h3 dir="auto">This issue exists in the latest npm version</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I am using the latest npm</li>
</ul>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto">npm WARN config global <code class="notranslate">--global</code>, <code class="notranslate">--local</code> are deprecated. Use <code class="notranslate">--location=global</code> instead.</p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">no more"npm WARN config global <code class="notranslate">--global</code>, <code class="notranslate">--local</code> are deprecated. Use <code class="notranslate">--location=global</code> instead."</p>
<h3 dir="auto">Steps To Reproduce</h3>
<ol dir="auto">
<li>In this environment...</li>
<li>With this config...</li>
<li>Run '...'</li>
<li>See error...</li>
</ol>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>npm:8.15.0</li>
<li>Node.js:16.15.1</li>
<li>OS Name:Win10</li>
<li>System Model Name:Omen 16</li>
<li>npm config:</li>
</ul>
<div class="highlight highlight-source-ini notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="C:\Users\Tang&gt;npm help npm
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead."><pre class="notranslate">C:\Users\Tang&gt;npm help npm
npm WARN config global `--global`, `--local` are deprecated. Use `--<span class="pl-k">location</span>=global` instead.</pre></div>
<h3 dir="auto">Is there an existing issue for this?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the existing issues</li>
</ul>
<h3 dir="auto">This issue exists in the latest npm version</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I am using the latest npm</li>
</ul>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto">current version of npm (8.11.0, node 16.15.1) writes a warning to STDERR on every command, that is a warning about using deprecated options.  The message is...</p>
<p dir="auto"><code class="notranslate">npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.</code></p>
<p dir="auto">The message is written to STDERR regardless of whether or not the command run uses the --global or --local options.  For example, the command...</p>
<p dir="auto">npm -v</p>
<p dir="auto">outputs the message, even though -v is the only option used, and writes to STDERR, even though it states it's purpose to be a warning, not an error, and the command still executes successfully.</p>
<p dir="auto">The result for my organization is to break our nightly builds.  Our builds need to monitor STDERR for REAL build errors, which also use STDERR to capture a variety of aberrant build conditions including security vulnerabilities that are reported back to the build pipeline via STDERR in a script that runs "npm audit" and analyzes the results.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/18708621/171736746-431947f2-430d-4b29-b33f-c84284757d21.png"><img src="https://user-images.githubusercontent.com/18708621/171736746-431947f2-430d-4b29-b33f-c84284757d21.png" alt="npm-warn" style="max-width: 100%;"></a></p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">IMHO, this warning should only be written if the deprecated options are used, and should be written to STDOUT since it is not an error, just a warning.</p>
<h3 dir="auto">Steps To Reproduce</h3>
<ol dir="auto">
<li>In Windows...</li>
<li>Running node 16.15.1 and npm 8.11.0</li>
<li>Run any npm command, i.e. npm -v</li>
<li>See results...<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/18708621/171734613-188a0d55-ad69-4b02-b7d0-26f1e15320d5.png"><img src="https://user-images.githubusercontent.com/18708621/171734613-188a0d55-ad69-4b02-b7d0-26f1e15320d5.png" alt="npm output" style="max-width: 100%;"></a></li>
</ol>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>npm: 8.11.0</li>
<li>Node.js: 16.15.1</li>
<li>OS Name: Windows 10</li>
<li>System Model Name: Dell Precision 5500 series</li>
<li>npm config:</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="; &quot;user&quot; config from C:\Users\xxxx\.npmrc

cafile = &quot;C:\\cert\\OGS_int_CA.pem&quot;

; node bin location = C:\Program Files\nodejs\node.exe
; node version = v16.15.1
; npm local prefix = C:\Users\xxxx
; npm version = 8.11.0
; cwd = C:\Users\xxxx
; HOME = C:\Users\xxxx
; Run `npm config ls -l` to show all defaults."><pre class="notranslate"><code class="notranslate">; "user" config from C:\Users\xxxx\.npmrc

cafile = "C:\\cert\\OGS_int_CA.pem"

; node bin location = C:\Program Files\nodejs\node.exe
; node version = v16.15.1
; npm local prefix = C:\Users\xxxx
; npm version = 8.11.0
; cwd = C:\Users\xxxx
; HOME = C:\Users\xxxx
; Run `npm config ls -l` to show all defaults.
</code></pre></div>