title: Error with Webpack version 5.1.2 "MainTemplate.hooks.startup has been removed"
body: <p>I'm having an issue with a ReactJS + Webpack + Express I was watching in a tutorial.
  After I finished setting up the following files:</p>
  <ul>
  <li>server.js</li>
  <li>webpack.config.js</li>
  <li>.babelrc</li>
  <li>package.json</li>
  </ul>
  <p>After trying to run the server in the VS Code <code>bash</code> terminal. I get the following output:</p>
  <p><code>    Error: MainTemplate.hooks.startup has been removed (use RuntimeGlobals.startup instead) at Object.tap</code></p>
  <p>Here's the code on all the above files</p>
  <p>server.js:</p>
  <pre><code>    import express from 'express';
      import webpack from 'webpack';
      import WebpackDevMiddleware from 'webpack-dev-middleware';
      import webpackConfig from '../webpack.config';
  
      // init packages
      const app = express();
  
      // set server
      app.set('port', process.env.PORT || 8080);
  
      // middleware
      app.use(WebpackDevMiddleware(webpack(webpackConfig)));
  
      // routes
      app.get('/', (request, response) =&gt; {
          response.send('Hello, user');
      });
  
      app.get('/demo', (request, response) =&gt; {
          response.json({demo: 'Hello, demo user' });
      });
  
      // listen on port
      app.listen(app.get('port'), () =&gt; {
          console.log('server on port ', app.get('port'));
      });
  </code></pre>
  <p>webpack.config.js:</p>
  <pre><code>    import webpack from 'webpack';
      import htmlWebpackPlugin from 'html-webpack-plugin';
      import LiveReloadPlugin from 'webpack-livereload-plugin';
  
      export default {
          entry: './src/client/index.js',
          output: {
              path: '/',
              filename: 'bundle.js'
          },
          module: {
              rules: [
                  {
                      use: 'babel-loader',
                      test: /\.js$/,
                      exclude: /node_modules/
                  },
                  {
                      use: ['style-loader', 'css-loader'],
                      test: /\.css$/
                  },
                  {
                      test: /\.scss$/,
                      use: [
                          { loader: 'style-loader' },
                          {
                              loader: 'css-loader',
                              options: { sourceMap: true }
                          },
                          {
                              loader: 'sass-loader',
                              options: { sourceMap: true }
                          }
                      ]
                  }
              ]
          },
          plugins: [
              new htmlWebpackPlugin({ template: './src/client/index.html' }),
              new LiveReloadPlugin()
          ],
      }
  </code></pre>
  <p>.babelrc:</p>
  <pre><code>    {
          &quot;presets&quot;: [ &quot;env&quot;, &quot;react&quot; ]
      }
  </code></pre>
  <p>package.json:</p>
  <pre><code>    {
        &quot;name&quot;: &quot;nodejs-practice&quot;,
        &quot;version&quot;: &quot;1.0.0&quot;,
        &quot;description&quot;: &quot;NodeJS Practice with React, MongoDB and NodeJS&quot;,
        &quot;main&quot;: &quot;main.js&quot;,
        &quot;scripts&quot;: {
          &quot;dev&quot;: &quot;nodemon --exec babel-node src/server.js&quot;,
          &quot;test&quot;: &quot;echo \&quot;Error: no test specified\&quot; &amp;&amp; exit 1&quot;
        },
        &quot;keywords&quot;: [],
        &quot;author&quot;: &quot;&quot;,
        &quot;license&quot;: &quot;ISC&quot;,
        &quot;devDependencies&quot;: {
            &quot;babel-cli&quot;: &quot;^6.26.0&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;css-loader&quot;: &quot;^5.0.0&quot;,
            &quot;html-webpack-plugin&quot;: &quot;^4.5.0&quot;,
            &quot;node-sass&quot;: &quot;^4.14.1&quot;,
            &quot;nodemon&quot;: &quot;^2.0.5&quot;,
            &quot;sass-loader&quot;: &quot;^10.0.3&quot;,
            &quot;style-loader&quot;: &quot;^2.0.0&quot;,
            &quot;webpack&quot;: &quot;^5.1.2&quot;,
            &quot;webpack-dev-middleware&quot;: &quot;^3.7.2&quot;,
            &quot;webpack-livereload-plugin&quot;: &quot;^2.3.0&quot;
        },
        &quot;dependencies&quot;: {
            &quot;express&quot;: &quot;^4.17.1&quot;,
            &quot;react&quot;: &quot;^16.14.0&quot;,
            &quot;react-dom&quot;: &quot;^16.14.0&quot;
        }
      }
  </code></pre>
  <p>I want to know what the problem might be since I was looking for some answers but couldn't find anything.
  I think that I might have to downgrade several of the dependencies.</p>
  <p>Thanks.</p>