Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

156
Views
MiniCssExtractPlugin is not a constructor

I created a fresh create-react-app template and built the project with npm run build command and got this error. I ejected react-scripts and i looked for reason why it isn't it building, but i didn't find anything. i've fixed css files imports in components. node version 16.13.2, npm version 8.1.2

/home/pawel/projekty/hashcode/config/webpack.config.js:623
        new MiniCssExtractPlugin({
        ^

TypeError: MiniCssExtractPlugin is not a constructor
    at module.exports (/home/pawel/projekty/hashcode/config/webpack.config.js:623:9)
    at Object.<anonymous> (/home/pawel/projekty/hashcode/scripts/build.js:51:16)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47

and this is ejected webpack config https://github.com/PSmigielski/hashcode/blob/master/config/webpack.config.js

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

This seems to be a new issue that came out recently and an issue has been opened with the create-react-app repository.

https://github.com/facebook/create-react-app/issues/11930

The two workarounds right now seem to be these

1.) Pinning the mini css extract version:

npm i -D --save-exact mini-css-extract-plugin@2.4.5

2.) Adding a resolutions to the package.json works as well:

"resolutions": {
   "mini-css-extract-plugin": "2.4.5"
}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!