title: Webpack when run in terminal it gives an "error error: unknown option '-p'"
body: <p>I wanted to run Webpack using <strong>npm run build</strong> but it gives an error in the terminal</p>
  <pre><code>error: unknown option '-p'
  [webpack-cli] Run 'webpack --help' to see available commands and options
  npm ERR! code ELIFECYCLE
  C:\React Projects\Webpack\Project&gt;
  </code></pre>
  <p><a href="https://i.stack.imgur.com/bNUeV.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/bNUeV.jpg" alt="enter image description here" /></a></p>
  <p><strong>package.json</strong></p>
  <pre><code>{
    &quot;name&quot;: &quot;project&quot;,
    &quot;version&quot;: &quot;1.0.0&quot;,
    &quot;description&quot;: &quot;&quot;,
    &quot;main&quot;: &quot;index.js&quot;,
    &quot;dependencies&quot;: {
      &quot;webpack&quot;: &quot;^5.11.1&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;webpack-cli&quot;: &quot;^4.3.1&quot;
    },
    &quot;scripts&quot;: {
      &quot;test&quot;: &quot;echo \&quot;Error: no test specified\&quot; &amp;&amp; exit 1&quot;,
      &quot;build&quot;: &quot;webpack -p&quot;,
      &quot;watch&quot;: &quot;webpack --watch&quot;
    },
    &quot;author&quot;: &quot;&quot;,
    &quot;license&quot;: &quot;ISC&quot;
  }
  </code></pre>