title: Webpack-dev-server "Cannot GET /"
body: <p>i'm trying to get my webpack-dev-server to run but i face always the error &quot;Cannot Get /&quot; at the browser.
  I know that there are serveral questions with the same error, but none of them helped me, so now i will try my luck :)</p>
  <p>these are my webpack-config.js configurations:</p>
  <pre><code>const path = require('path');
  
  module.exports = {
    mode: 'development',
    entry: './src/app.ts',
    output: {
      filename: 'bundle.js',
      path: path.resolve(__dirname, 'dist')
    },
    devtool: 'inline-source-map',
    module: {
      rules: [
        {
          test: /\.ts$/,
          use: 'ts-loader',
          exclude: /node_modules/
        }
      ]
    },
    resolve: {
      extensions: ['.ts', '.js']
    }
  };
  </code></pre>
  <p>package.json:</p>
  <pre><code>{
    &quot;name&quot;: &quot;ts&quot;,
    &quot;version&quot;: &quot;1.0.0&quot;,
    &quot;description&quot;: &quot;test&quot;,
    &quot;main&quot;: &quot;app.js&quot;,
    &quot;scripts&quot;: {
      &quot;test&quot;: &quot;echo \&quot;Error: no test specified\&quot; &amp;&amp; exit 1&quot;,
      &quot;start&quot;: &quot;webpack-dev-server&quot;,
      &quot;build&quot;: &quot;webpack&quot;
    },
    &quot;keywords&quot;: [],
    &quot;author&quot;: &quot;&quot;,
    &quot;license&quot;: &quot;ISC&quot;,
    &quot;devDependencies&quot;: {
      &quot;clean-webpack-plugin&quot;: &quot;^4.0.0&quot;,
      &quot;html-loader&quot;: &quot;^3.1.0&quot;,
      &quot;html-webpack-plugin&quot;: &quot;^5.5.0&quot;,
      &quot;lite-server&quot;: &quot;^2.6.1&quot;,
      &quot;ts-loader&quot;: &quot;^9.2.8&quot;,
      &quot;typescript&quot;: &quot;^4.6.2&quot;,
      &quot;webpack&quot;: &quot;^5.70.0&quot;,
      &quot;webpack-cli&quot;: &quot;^4.9.2&quot;,
      &quot;webpack-dev-server&quot;: &quot;^4.7.4&quot;
    },
    &quot;dependencies&quot;: {
      &quot;lodash&quot;: &quot;^4.17.21&quot;
    }
  }
  </code></pre>
  <p>And the script to find the bundle.js from index.html looks like that:</p>
  <pre><code>&lt;script type=&quot;module&quot; src=&quot;dist/bundle.js&quot;&gt;&lt;/script&gt;
  </code></pre>
  <p>Side note: index.html is not in the dist folder like bundle.js, but i get the same error anyways.</p>
  <p><strong>UPDATE| SOLVED</strong></p>
  <p>If anyone will face the same issue:</p>
  <p>&quot;webpack-dev-server&quot; is since 5.0 (or so) no longer supported. You have to change it to</p>
  <p>&quot;start&quot;: &quot;webpack serve&quot;,</p>
  <p>Moreover, here my webpack-config.js file changes, which did the trick:</p>
  <pre><code>    const path = require('path');
       
      module.exports = {
          mode: 'development',
          entry: './src/app.ts',
          output: {
              filename: 'bundle.js',
              path: path.resolve(__dirname, 'dist'),
              publicPath: '/dist/',
          },
          devServer: {
              static: {
                  directory: path.join(__dirname, '/')
              }
          },
         .
         .
         .
  };
  </code></pre>