If, at some point, you’re working on some front-end code using NPM and when you attempt to install a package, you get a message that resembles something like this (you’re mileage obviously may vary):
TypeError: Cannot read property 'properties' of undefined
...
at Object.<anonymous> ([...]/node_modules/webpack/bin/webpack.js:156:2)
That is, the primary problem being: TypeError: Cannot read property ‘properties’ of undefined
The best solution I’ve found to the problem is to remove webpack
and the webpack-cli
and reinstall it using the --save-dev
directive.