Solved — `npm run build`, error `TypeError: MiniCssExtractPlugin is not a constructor`

Error:

PS D:\ ****\ **\*\profile> npm run build

> profile@0.1.0 build
> react-scripts build

D:\ ****\ **\profile\node_modules\react-scripts\config\webpack.config.js:664
new MiniCssExtractPlugin({
^

TypeError: MiniCssExtractPlugin is not a constructor
at module.exports (D:\Documents\Project\React\profile\node_modules\react-scripts\config\webpack.config.js:664:9)

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Flutter Developer

Flutter Developer

Flutter and Native Android developer