title: Node JS Webpack Build Failed
body: <p>I want to keep the Backend project I developed with Node JS as Build and keep it as 1 HTML file on my server as Webpack. I am developing with nodemon, no problem, but according to my configuration, the &quot;NPM RUN BUILD&quot; dwelling does not work. Could cause the problem?</p>
  <p>30 different errors return, this is one. All of them write other library information like this.
  <strong>&quot;Module not found: Error: Can't resolve 'zlib' in '/ Users / ugurcanalyuz / Projects / Ekartex / ekartex_backend / node_modules / body-parser / lib'&quot;</strong></p>
  <p>webpack.config.js</p>
  <pre><code> const path = require(&quot;path&quot;);
      module.exports = {
          entry: './server.js',
          output: {
              path: path.resolve(__dirname, 'dist'),
              filename: 'bundle.js'
          },
          devServer: {
              contentBase: './dist',
              compress: true,
              port: 3200
          },
          module: {
              rules: [
                  {
                      test: /\.js$/,
                      exclude: /node_modules/,
                      loader: &quot;babel-loader&quot;
                  }
              ]
          }
      }
  </code></pre>
  <p>server.js</p>
  <pre><code>const express = require(&quot;express&quot;);
  const app = express();
  
  const users = require(&quot;./src/routers/users&quot;);
  app.use(users);
  
  app.listen(3200, () =&gt; {
      console.log(&quot;Sistem açık&quot;);
  })
  </code></pre>
  <p>package.json</p>
  <pre><code>{
    &quot;name&quot;: &quot;exxx&quot;,
    &quot;version&quot;: &quot;1.0.0&quot;,
    &quot;description&quot;: &quot;&quot;,
    &quot;main&quot;: &quot;server.js&quot;,
    &quot;scripts&quot;: {
      &quot;start&quot;: &quot;nodemon server.js&quot;,
      &quot;build&quot;: &quot;webpack --mode production&quot;
    },
    &quot;repository&quot;: {
      &quot;type&quot;: &quot;git&quot;
    },
    &quot;keywords&quot;: [],
    &quot;author&quot;: &quot;&quot;,
    &quot;license&quot;: &quot;ISC&quot;,
    &quot;devDependencies&quot;: {
      &quot;@babel/core&quot;: &quot;^7.12.10&quot;,
      &quot;@babel/preset-env&quot;: &quot;^7.12.11&quot;,
      &quot;babel-loader&quot;: &quot;^8.2.2&quot;,
      &quot;webpack&quot;: &quot;^5.11.1&quot;,
      &quot;webpack-cli&quot;: &quot;^4.3.1&quot;,
      &quot;webpack-dev-server&quot;: &quot;^3.11.1&quot;
    },
    &quot;dependencies&quot;: {
      &quot;express&quot;: &quot;^4.17.1&quot;
    }
  }
  </code></pre>