title: Cannot run npm commands due to sh: 1: webpack: not found error; same exact codebase runs commands fine elsewhere
body: <p>I'm having a very strange issue with nvm, npm and webpack.</p>
  <p>We have a webpack file with a <code>npm run publish</code> command. I have 4 stacks setup locally on the same code repository. In 3 of the stacks, I can <code>npm run publish</code> without an issue. However, in the 4th stack I always get a <code>sh: 1: webpack: not found</code> error when I run the command. The worrisome bit, is the codebases are identical. I've ran diffs, altered permissions, ran <code>npm rebuild</code>, re-ran <code>npm install</code> and <code>nvm use</code>. I've removed the <code>node_modules</code> directory and ran an <code>npm install</code>. No matter what I do, I get the same error.</p>
  <p>Here is the verbose error with a few local names blocked out:</p>
  <pre><code>21 timing command:run-script Completed in 25ms
  22 verbose stack Error: command failed
  22 verbose stack     at ChildProcess.proc.on (/home/&lt;usr&gt;/.nvm/versions/node/v11.14.0/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
  22 verbose stack     at ChildProcess.emit (events.js:193:13)
  22 verbose stack     at maybeClose (internal/child_process.js:999:16)
  22 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:266:5)
  </code></pre>
  <p>Any help is very much appreciated! Thanks!</p>