Webpack: TypeError: Cannot read property 'properties' of undefined

If it is happening after you have updated npm packages , then remove and reinstall webpack webpack-cli
npm remove webpack webpack-cli
npm install --save-dev webpack webpack-cli
I would suggest you to upgrade/update node before doing anything.


It's ^ symbol in "webpack-cli": "^2.0.10" dependency which resulting to minor/patch version getting upgraded to latest [email protected], which has following change.

Change in webpack resulting in the issue: (change output to outputOptions) REF: https://github.com/webpack/webpack-cli/pull/605

Solution: (installing [email protected])

npm uninstall webpack-cli

npm install --save-dev [email protected]

REF:Solution


Try to install latest LTS version of Node and test again. Works perfectly fine for me with latest LTS node and npm.


There are two things you need to do:

  1. Remove [email protected] and [email protected] dependency and specifically install [email protected] and [email protected] version. Webpack 4.20.x release has error.
  2. Also do not use extract-text-webpack-plugin.

extract-text-webpack-plugin should not be used with Webpack 4 to extract CSS. It doesn't work. Instead of this, try using: mini-css-extract-plugin.

After these changes, webpack should compile your code and generate necessary bundle.

Note: When I cloned mentioned repository on my system, I had to make changes to board.js file. I made change to this import statement: import CoinMarketCap from 'components/Partials/Coinmarketcap/link'; This doesn't work on Linux system as paths are case sensitive.