<p dir="auto">npm WARN deprecated fsevents@1.2.9: One of your dependencies needs to upgrade to fsevents v2: 1) Proper nodejs v10+ support 2) No more fetching binaries from AWS, smaller package size<br>
npm WARN deprecated core-js@1.2.7: core-js@&lt;3.0 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.<br>
[            ......] | extract:rxjs: sill extract rxjs@^6.5.2 extracted to /mnt/d/work/luoshu/node_modules/.staging/rxj<br>
[            ......] | extract:rxjs: sill extract rxjs@^6.5.2 extracted to /mnt/d/work/luoshu/node_modules/.staging/rxj<br>
npm ERR! cb() never called!</p>
<p dir="auto">npm ERR! This is an error with npm itself. Please report this error at:<br>
npm ERR!     <a href="https://npm.community" rel="nofollow">https://npm.community</a></p>
<p dir="auto">npm ERR! A complete log of this run can be found in:<br>
npm ERR!     /home/zhaohx/.npm/_logs/2019-12-11T10_27_58_941Z-debug.log</p>
<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">I can observe moduleA in node_modules of moduleB</p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">npm must not download a peer dependency if it is resolvable within NODE_PATH or any other method described in <a href="https://nodejs.org/api/modules.html#loading-from-the-global-folders" rel="nofollow">https://nodejs.org/api/modules.html#loading-from-the-global-folders</a></p>
<h3 dir="auto">Steps To Reproduce</h3>
<ol dir="auto">
<li>Install moduleA globally (<code class="notranslate">npm i -g moduleA</code>)</li>
<li>Install moduleB, where moduleA is set as a peer dependency locally: <code class="notranslate">NODE_PATH=&lt;node_modules_root_where_moduleA_installled&gt; npm i moduleB</code></li>
<li>Check node_modules folder of moduleB</li>
</ol>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>npm: 8.16.0</li>
<li>Node.js: v18.5.0</li>
<li>OS Name: macOS</li>
<li>System Model Name: Darwin SL-1204 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:22 PDT 2022; root:xnu-8020.121.3~4/RELEASE_X86_64 x86_64</li>
<li>npm config:</li>
</ul>
<div class="highlight highlight-source-ini notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="; copy and paste output from `npm config ls` here"><pre class="notranslate"><span class="pl-c"><span class="pl-c">;</span> copy and paste output from `npm config ls` here</span></pre></div>