title: how to avoid "Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema."
body: <p>I am working with webpack to setup a react project. but after running command below</p>
  <pre><code>npm start
  </code></pre>
  <p>I have got following error in terminal</p>
  <pre><code>× ｢wds｣: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
   - configuration.entry['main'] should not contain the item '—' twice.
     -&gt; A non-empty array of non-empty strings
  </code></pre>
  <p>here is my webpack.config.js file</p>
  <pre><code>const path = require('path');
  const HWP = require('html-webpack-plugin');
  module.exports = {
      entry: path.join(__dirname, '/src/index.js'),
      output: {
          filename: 'build.js',
          path: path.join(__dirname, '/dist')},
      module:{
          rules:[{
             test: /\.js$/,
             exclude: /node_modules/,
             loader: 'babel-loader'
          }]
      },
      plugins:[
          new HWP(
             {template: path.join(__dirname,'/src/index.html')}
          )
      ]
  }
  </code></pre>
  <p>And below is the code for package.json</p>
  <pre><code>{
    &quot;name&quot;: &quot;aragon-connect-1.1&quot;,
    &quot;version&quot;: &quot;1.0.0&quot;,
    &quot;description&quot;: &quot;&quot;,
    &quot;scripts&quot;: {
      &quot;start&quot;: &quot;webpack-dev-server — mode development — open — hot&quot;,
      &quot;build&quot;: &quot;webpack — mode production&quot;
    },
    &quot;author&quot;: &quot;Author Name&quot;,
    &quot;license&quot;: &quot;ISC&quot;,
    &quot;dependencies&quot;: {
      &quot;react&quot;: &quot;^16.13.1&quot;,
      &quot;react-dom&quot;: &quot;^16.13.1&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;babel-core&quot;: &quot;^6.26.3&quot;,
      &quot;babel-loader&quot;: &quot;^8.1.0&quot;,
      &quot;babel-preset-env&quot;: &quot;^1.7.0&quot;,
      &quot;babel-preset-react&quot;: &quot;^6.24.1&quot;,
      &quot;html-webpack-plugin&quot;: &quot;^4.3.0&quot;,
      &quot;webpack&quot;: &quot;^4.44.1&quot;,
      &quot;webpack-cli&quot;: &quot;^3.3.12&quot;,
      &quot;webpack-dev-server&quot;: &quot;^3.11.0&quot;
    }
  }
  
  </code></pre>
  <p>Can anyone let me know about where I am getting wrong?
  Thanks in advance</p>