<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">In a package <code class="notranslate">foo</code> with a bin, run <code class="notranslate">npx foo</code>, and you'll see <code class="notranslate">sh: foo: command not found</code>.</p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">In a package <code class="notranslate">foo</code> with a bin, run <code class="notranslate">npx foo</code>, and the bin is invoked.</p>
<h3 dir="auto">Steps To Reproduce</h3>
<ol dir="auto">
<li>Clone any repo, presumably, but in this case, <a href="https://github.com/ljharb/publishers">https://github.com/ljharb/publishers</a></li>
<li>Run <code class="notranslate">npx npm@8.7 exec publishers</code>, see that it invokes the binary properly.</li>
<li>Run <code class="notranslate">npx npm@8.8 exec publishers</code>, see that it errors.</li>
</ol>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>npm: &lt;= 8.7, &gt;= 8.8</li>
<li>Node.js: 19</li>
</ul>
<h1 dir="auto">What / Why</h1>
<p dir="auto">I am behind an authenticated corporate proxy.</p>
<p dir="auto">To set the proxy i am using</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="npm config set proxy http://username:password@proxy.company.com
npm config set https-proxy http://username:password@proxy.company.com"><pre class="notranslate"><code class="notranslate">npm config set proxy http://username:password@proxy.company.com
npm config set https-proxy http://username:password@proxy.company.com
</code></pre></div>
<p dir="auto">I had to reset the passord but forgot to reset it for npm.</p>
<p dir="auto">When running:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="npm install"><pre class="notranslate"><code class="notranslate">npm install
</code></pre></div>
<p dir="auto">npm responded with the error</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" error cb() never called!"><pre class="notranslate"><code class="notranslate"> error cb() never called!
</code></pre></div>
<p dir="auto">Changing the password with <code class="notranslate">npm config set proxy</code> fixed the problem.</p>
<h2 dir="auto">Where</h2>
<ul dir="auto">
<li>Windows 10 VM</li>
<li>npm@6.13.1</li>
<li>node@v10.15.3</li>
</ul>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto">npm install throws error <code class="notranslate">cb() never called!</code></p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">I would like to see a 407 Proxy Authentication Error printed to console and not just to the log.</p>
<h2 dir="auto">Log</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="0 info it worked if it ends with ok
1 verbose cli [ 'C:\\MYFOLDER\\nodejs\\node.exe',
1 verbose cli   'C:\\MYFOLDER\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'update' ]
2 info using npm@6.13.1
3 info using node@v10.15.3
4 verbose npm-session 66cb6a3319a6069e
5 verbose update computing outdated modules to update
6 http fetch GET 407 https://registry.npmjs.org/@thekla%2fconfig 365ms
7 http fetch GET 407 https://registry.npmjs.org/@thekla%2fcore 364ms
8 http fetch GET 407 https://registry.npmjs.org/del-cli 392ms
9 http fetch GET 407 https://registry.npmjs.org/@thekla%2fweb-and-mobile-abilities 425ms
10 http fetch GET 407 https://registry.npmjs.org/cucumber-html-reporter 446ms
11 http fetch GET 407 https://registry.npmjs.org/npm 667ms
12 http fetch GET 407 https://registry.npmjs.org/thekla 1061ms
13 http fetch GET 407 https://registry.npmjs.org/eslint-plugin-standard 1149ms
14 http fetch GET 407 https://registry.npmjs.org/eslint-plugin-node 1357ms
15 http fetch GET 407 https://registry.npmjs.org/eslint-config-standard 1358ms
16 http fetch GET 407 https://registry.npmjs.org/eslint-plugin-import 1472ms
17 http fetch GET 407 https://registry.npmjs.org/junit-report-builder 1637ms
18 http fetch GET 407 https://registry.npmjs.org/eslint-plugin-promise 1854ms
19 http fetch GET 407 https://registry.npmjs.org/typescript 1884ms
20 http fetch GET 407 https://registry.npmjs.org/@typescript-eslint%2fparser 2157ms
21 http fetch GET 407 https://registry.npmjs.org/@typescript-eslint%2feslint-plugin 2277ms
22 http fetch GET 407 https://registry.npmjs.org/log4js 2283ms
23 http fetch GET 407 https://registry.npmjs.org/eslint 2286ms
24 timing npm Completed in 4030ms
25 error cb() never called!
26 error This is an error with npm itself. Please report this error at:
27 error &lt;https://npm.community&gt;"><pre class="notranslate"><code class="notranslate">0 info it worked if it ends with ok
1 verbose cli [ 'C:\\MYFOLDER\\nodejs\\node.exe',
1 verbose cli   'C:\\MYFOLDER\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'update' ]
2 info using npm@6.13.1
3 info using node@v10.15.3
4 verbose npm-session 66cb6a3319a6069e
5 verbose update computing outdated modules to update
6 http fetch GET 407 https://registry.npmjs.org/@thekla%2fconfig 365ms
7 http fetch GET 407 https://registry.npmjs.org/@thekla%2fcore 364ms
8 http fetch GET 407 https://registry.npmjs.org/del-cli 392ms
9 http fetch GET 407 https://registry.npmjs.org/@thekla%2fweb-and-mobile-abilities 425ms
10 http fetch GET 407 https://registry.npmjs.org/cucumber-html-reporter 446ms
11 http fetch GET 407 https://registry.npmjs.org/npm 667ms
12 http fetch GET 407 https://registry.npmjs.org/thekla 1061ms
13 http fetch GET 407 https://registry.npmjs.org/eslint-plugin-standard 1149ms
14 http fetch GET 407 https://registry.npmjs.org/eslint-plugin-node 1357ms
15 http fetch GET 407 https://registry.npmjs.org/eslint-config-standard 1358ms
16 http fetch GET 407 https://registry.npmjs.org/eslint-plugin-import 1472ms
17 http fetch GET 407 https://registry.npmjs.org/junit-report-builder 1637ms
18 http fetch GET 407 https://registry.npmjs.org/eslint-plugin-promise 1854ms
19 http fetch GET 407 https://registry.npmjs.org/typescript 1884ms
20 http fetch GET 407 https://registry.npmjs.org/@typescript-eslint%2fparser 2157ms
21 http fetch GET 407 https://registry.npmjs.org/@typescript-eslint%2feslint-plugin 2277ms
22 http fetch GET 407 https://registry.npmjs.org/log4js 2283ms
23 http fetch GET 407 https://registry.npmjs.org/eslint 2286ms
24 timing npm Completed in 4030ms
25 error cb() never called!
26 error This is an error with npm itself. Please report this error at:
27 error &lt;https://npm.community&gt;
</code></pre></div>