Tons of users are reporting that their builds of the Facebook Create React app are failing since yesterday.
The cause was attributed to an addiction used by create-react-app, the latest version of which breaks apps from developers.
While a stable solution has yet to be identified, here is a simple workaround that developers can adopt.
create-react-app builds fail worldwide
Create React App is an open source project produced by Facebook (Meta) and made available on both GitHub and above sea level to help developers build single-page React apps quickly.
The GitHub project is used by more than 5.4 million repositories, while the npm version receives around 200,000 weekly downloads on average.
The tool offers a modern build setup without requiring complex configuration – so developers can build a React app with just a few simple commands.
This explains why so many developers would rely on create-react-app and have been experiencing build failure issues since yesterday.
Software engineer Jean Athanasiou and front-end developer Ronald Groot Jebbink were joined by many GitHub users who reported issues building their create-react-app built today.

Addiction hell has struck again
The simple error message “TypeError: MiniCssExtractPlugin is not a constructor”, reveals it.
The problem was attributed to one of the dependencies, called mini-css-extract-plugin, used by create-react-app.
Mini CSS Extract Plugin is another popular project with over 4.6 million GitHub repositories relying on it.
With over 7,000 npm projects depending on the Mini CSS Extract plugin, the project receives 10 million weekly downloads on average on the npm registry.
The Mini CSS Extract plugin was released in 2018, around the same time as Extract text webpack plugin was disapproved by its author.
This project extracts the CSS into separate files, generating one CSS file per JS file containing CSS.
The latest version of Mini CSS Extract Plugin, 2.5.0 was released less than a day ago and appears to be the culprit. It is since the publication of this particular version that create-react-app project builds started to fail.
Interestingly, as BleepingComputer shows, the change log for version 2.5.0, the maintainer noted a new feature addition, “types” having been created:

And we wonder if the particular to commit this is what has an impact create-react-app case to break.
A error report filed for the Mini CSS Extract Plugin maintainers to investigate some possible causes.
Until a concrete fix was identified by Facebook’s open source team, the developers noted success by downgrading their version of the mini-css-extract-plugin to 2.4.5:
A minor version bump on mini-css-extract-plugin to 2.5.0 breaks most implementations. Pin your version to 2.4.5 until a fix is released https://t.co/Km55Pw0cC6 (Also https://t.co/63FhuaYmVr) #webdev #js #webpack
—Terry (@teddyrise) January 14, 2022
This can be done by updating your JavaScript application package.json file to include the following lines, thus pinning the dependency version to 2.4.5, as proposed by developer Alexandru Pavaloi:
"resolutions":
"mini-css-extract-plugin": "2.4.5"
,
Those who do not use wire, and for whom the workaround above fails, try running the following command, like suggested by front-end developer Oscar Busk:
npm i -D --save-exact [email protected]
“I tried all the ‘resolutions’ as well as the ‘replacements’ but none of it worked until I tried the one above!” writing an user.
Note that Facebook’s Create React app may not be the only significant app to be affected by the new dependency release.
npm project @wordpress/scripts is also would have breakup.
Auth0 SDK Developers for Single Page Apps are lock oneself up temporarily the dependency version to ‘2.4.5’ to be sure.
Although not malicious in nature, this incident follows last week’s news of popular “colors” and “fake” npm dependencies breaking thousands of software projects after their developer corrupted them.
BleepingComputer contacted Facebook (Meta) to better understand the cause of the problem. In the meantime, we hope the workarounds above will save your React builds.