title: sh: 1: webpack: not found
body: <p>I am developing React+Django application
  When I call <code>npm run dev</code></p>
  <p>I receive an error</p>
  <blockquote>
  <p>sh: 1: webpack: not found</p>
  </blockquote>
  <pre><code>npm ERR! Linux 4.4.0-197-generic
  npm ERR! argv &quot;/usr/bin/nodejs&quot; &quot;/usr/bin/npm&quot; &quot;run&quot; &quot;dev&quot;
  npm ERR! node v4.2.6
  npm ERR! npm  v3.5.2
  npm ERR! file sh
  npm ERR! code ELIFECYCLE
  npm ERR! errno ENOENT
  npm ERR! syscall spawn
  npm ERR! frontend@1.0.0 dev: `webpack --mode development ./src/index.js --output ./static/frontend/main.js`
  npm ERR! spawn ENOENT
  npm ERR! 
  npm ERR! Failed at the frontend@1.0.0 dev script 'webpack --mode development ./src/index.js --output ./static/frontend/main.js'.
  npm ERR! Make sure you have the latest version of node.js and npm installed.
  npm ERR! If you do, this is most likely a problem with the frontend package,
  npm ERR! not with npm itself.
  npm ERR! Tell the author that this fails on your system:
  npm ERR!     webpack --mode development ./src/index.js --output ./static/frontend/main.js
  npm ERR! You can get information on how to open an issue for this project with:
  npm ERR!     npm bugs frontend
  npm ERR! Or if that isn't available, you can get their info via:
  npm ERR!     npm owner ls frontend
  npm ERR! There is likely additional logging output above.
  </code></pre>
  <p><strong>package.json</strong></p>
  <pre><code>{
    &quot;name&quot;: &quot;frontend&quot;,
    &quot;version&quot;: &quot;1.0.0&quot;,
    &quot;main&quot;: &quot;index.js&quot;,
    &quot;scripts&quot;: {
      &quot;dev&quot;: &quot;webpack --mode development ./src/index.js --output ./static/frontend/main.js&quot;,
      &quot;build&quot;: &quot;webpack --mode production ./src/index.js --output ./static/frontend/main.js&quot;
    },
    &quot;keywords&quot;: [],
    &quot;author&quot;: &quot;&quot;,
    &quot;license&quot;: &quot;ISC&quot;,
    &quot;dependencies&quot;: {},
    &quot;devDependencies&quot;: {
      &quot;react&quot;: &quot;^17.0.1&quot;,
      &quot;react-dom&quot;: &quot;^17.0.1&quot;
    },
    &quot;description&quot;: &quot;&quot;
  }
  </code></pre>
  <p>Found out that in .<code>/node_modules/.bin/</code> i have only <code>loose-envify -&gt; ../loose-envify/cli.js*</code>
  I read this question <a href="https://stackoverflow.com/questions/44845143/webpack-command-not-found">Webpack command not found</a>, but didn't understand how to fix my error.</p>