Hello Guys, How are you all? Hope You all Are Fine. Today I am trying to run my project but I am facing following error TypeError: MiniCssExtractPlugin is not a constructor in webpack. So Here I am Explain to you all the possible solutions here.
Without wasting your time, Let’s start This Article to Solve This Error.
How TypeError: MiniCssExtractPlugin is not a constructor Error Occurs ?
I am trying to run my project but I am facing following error.
[webpack-cli] TypeError: MiniCssExtractPlugin is not a constructor
How To Solve TypeError: MiniCssExtractPlugin is not a constructor Error ?
- How To Solve TypeError: MiniCssExtractPlugin is not a constructor Error ?
To Solve TypeError: MiniCssExtractPlugin is not a constructor Error This Problem May Occurs Cause Of mini-css-extract-plugin is updated to version
2.5.0
So If You have updated mini-css-extract-plugin Then You Just have to downgrade to 2.4.5. Just like This in your package.json: “mini-css-extract-plugin”: “2.4.5” And If You are using NPM then Just run this command to downgrade: npm i -D –save-exact mini-css-extract-plugin@2.4.5 Now, Your Error Must be solved. - TypeError: MiniCssExtractPlugin is not a constructor
To Solve TypeError: MiniCssExtractPlugin is not a constructor Error This Problem May Occurs Cause Of mini-css-extract-plugin is updated to version
2.5.0
So If You have updated mini-css-extract-plugin Then You Just have to downgrade to 2.4.5. Just like This in your package.json: “mini-css-extract-plugin”: “2.4.5” And If You are using NPM then Just run this command to downgrade: npm i -D –save-exact mini-css-extract-plugin@2.4.5 Now, Your Error Must be solved.
Solution 1: Downgrade mini-css-extract-plugin
This Problem May Occurs Cause Of mini-css-extract-plugin is updated to version 2.5.0
So If You have updated mini-css-extract-plugin Then You Just have to downgrade to 2.4.5. Just like This in your package.json.
"resolutions": {
"mini-css-extract-plugin": "2.4.5"
},
And If You are using NPM then Just run this command to downgrade.
npm i -D --save-exact mini-css-extract-plugin@2.4.5
Now, Your Error Must be solved.
Summary
It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?
Also, Read
Thank you very much!
It really Worked. Tank you very much!
Great its working, Thanks
yes it worked…Thanks a lot