'Dev Server has been initialized using an options object that does not match the API schema

I'm getting the following error after upgrading angular 8 to 9,

        An unhandled exception occurred: Invalid options object. Dev Server has been 
          initialized using an options object that does not match the API schema.
           - options has an unknown property 'contentBase'. These properties are 
          valid:
            object { allowedHosts?, bonjour?, client?, compress?, devMiddleware?, 
          headers?, historyApiFallback?, host?, hot?, http2?, https?, ipc?, 
          liveReload?, magicHtml?, onAfterSetupMiddleware?, 
           See "/private/var/folders/fp/tmjy2_2j15s50f6qpyj6x6mm0000gr/T/ng- 
           xbMtW3/angular-errors.log" for further details.

From what i've read i understood it's something to do with webpack - since i don't have experience with webpack configuration - i don't really know where to begin.

Here is my webpack.config.js

    'use strict';
const path = require('path');
const SpritesmithPlugin = require('webpack-spritesmith');

const plugins = [
  new SpritesmithPlugin({
    src: {
      cwd: path.resolve(__dirname, 'src/styles/icons'),
      glob: '*.png'
    },
    target: {
      image: path.resolve(__dirname, 'src/assets/images/sprite.png'),
      css: path.resolve(__dirname, 'src/styles/_ui-sprite.scss')
    },
    apiOptions: {
      cssImageRef: "assets\/images\/sprite.png",
      generateSpriteName: function (sprite) {
        return 'icon-' + path.basename(sprite, '.png');
      }
    }
  })
];

module.exports = {
  context: __dirname,
  mode: 'development',
  entry: {'doNotTouch': './doNotTouch.ts'},

  output: {
    path: __dirname,
    filename: '[name].js'
  },

  plugins: plugins,

  module: {
    rules: []
  }
};


Solution 1:[1]

It most likely has to do with conflicting versions of a module you downloaded on different folders.

Delete all your node modules and web packages and reinstall them.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Maxwell Derry