<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">Current Behavior</h3>
<p dir="auto">Minimal reproduction is here:<br>
<a href="https://github.com/bigtimebuddy/npm-bug-package-lock-only">https://github.com/bigtimebuddy/npm-bug-package-lock-only</a></p>
<p dir="auto">Package structure is roughly this:</p>
<ul dir="auto">
<li>packages/package-a (<em>@package/a</em>)
<ul dir="auto">
<li>devDependencies
<ul dir="auto">
<li><em>@tools/a</em></li>
</ul>
</li>
</ul>
</li>
<li>package/tools-a (<em>@tools/a</em>) <strong>private</strong></li>
</ul>
<p dir="auto">After doing a version bump of my workspaces packages, I use <code class="notranslate">--package-lock-only option</code> to update the <strong>package-lock.json</strong> file.  Prior to npm@7.20.2 this worked fine. After then, it fails with the following message:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@tools%2fa - Not found
npm ERR! 404 
npm ERR! 404  '@tools/a@2.0.0' is not in this registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     ~/.npm/_logs/2021-10-29T17_43_19_186Z-debug.log"><pre class="notranslate"><code class="notranslate">npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@tools%2fa - Not found
npm ERR! 404 
npm ERR! 404  '@tools/a@2.0.0' is not in this registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     ~/.npm/_logs/2021-10-29T17_43_19_186Z-debug.log
</code></pre></div>
<h2 dir="auto">Additional Links</h2>
<p dir="auto">Changed was introduced here: <a class="commit-link" href="https://github.com/npm/cli/compare/v7.20.2...v7.20.3"><tt>v7.20.2...v7.20.3</tt></a><br>
Additional context here: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="874199630" data-permission-text="Title is private" data-url="https://github.com/lerna/lerna/issues/2891" data-hovercard-type="issue" data-hovercard-url="/lerna/lerna/issues/2891/hovercard" href="https://github.com/lerna/lerna/issues/2891">lerna/lerna#2891</a></p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">With the reproduction, should get the following and not fail.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="up to date, audited 6 packages in 1s

found 0 vulnerabilities"><pre class="notranslate"><code class="notranslate">up to date, audited 6 packages in 1s

found 0 vulnerabilities
</code></pre></div>
<h3 dir="auto">Steps To Reproduce</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="git clone https://github.com/bigtimebuddy/npm-bug-package-lock-only`
cd npm-bug-package-lock-only
npm i npm@8 -g
npm test"><pre class="notranslate">git clone https://github.com/bigtimebuddy/npm-bug-package-lock-only<span class="pl-s"><span class="pl-pds">`</span></span>
<span class="pl-s"><span class="pl-c1">cd</span> npm-bug-package-lock-only</span>
<span class="pl-s">npm i npm@8 -g</span>
<span class="pl-s">npm <span class="pl-c1">test</span></span></pre></div>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>OS: macOS v11.6</li>
<li>Node: v12.20.1</li>
<li>npm: v8.1.2</li>
</ul>