<p dir="auto">I am not sure if its just me but when I run <code class="notranslate">npm config get prefix</code> it hangs around 1-2 seconds.</p>
<p dir="auto">I am using this <a href="url">https://github.com/nvm-sh/nvm</a> to manage my Node versions which uses that npm command internally when new bash shell opens.</p>
<h1 dir="auto">What / Why</h1>
<p dir="auto">This is an attempt to resurrect this unresolved bug: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="185990332" data-permission-text="Title is private" data-url="https://github.com/npm/npm/issues/14458" data-hovercard-type="issue" data-hovercard-url="/npm/npm/issues/14458/hovercard" href="https://github.com/npm/npm/issues/14458">npm/npm#14458</a></p>
<p dir="auto">For some reason, the command <code class="notranslate">npm config get prefix</code> is multi-seconds slow. This normally wouldn't bother me, but for users of <code class="notranslate">nvm</code> like me, this is really impacting since it uses this command internally, and nvm is used in shell startup scripts. See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="94112977" data-permission-text="Title is private" data-url="https://github.com/nvm-sh/nvm/issues/782" data-hovercard-type="issue" data-hovercard-url="/nvm-sh/nvm/issues/782/hovercard" href="https://github.com/nvm-sh/nvm/issues/782">nvm-sh/nvm#782</a> for more details. Therefore, shell startup is super slow, especially for those using WSL.</p>
<h2 dir="auto">When</h2>
<p dir="auto">Always</p>
<h2 dir="auto">Where</h2>
<p dir="auto">NPM CLI</p>
<h2 dir="auto">How</h2>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto">Run <code class="notranslate">time npm config get prefix</code>, see multi-second response timing.</p>
<h3 dir="auto">Steps to Reproduce</h3>
<p dir="auto">Run <code class="notranslate">npm config get prefix</code></p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Result should come back quicker.</p>
<h2 dir="auto">Who</h2>
<p dir="auto">?</p>
<h2 dir="auto">References</h2>
<ul dir="auto">
<li>Related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="185990332" data-permission-text="Title is private" data-url="https://github.com/npm/npm/issues/14458" data-hovercard-type="issue" data-hovercard-url="/npm/npm/issues/14458/hovercard" href="https://github.com/npm/npm/issues/14458">npm/npm#14458</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="178931441" data-permission-text="Title is private" data-url="https://github.com/nvm-sh/nvm/issues/1242" data-hovercard-type="issue" data-hovercard-url="/nvm-sh/nvm/issues/1242/hovercard" href="https://github.com/nvm-sh/nvm/issues/1242">nvm-sh/nvm#1242</a></li>
</ul>