In the NPM repository there is another massive failure in projects due to problems in the new version of one of the popular dependencies. The source of problems was the new issue of the package mini-css-extract-plugin 2.5.0 designed to extract CSS into separate files. The package has more than 10 million weekly downloads and is used as a direct dependence in more than 7 thousand projects.
In the new version, changes were made, violating backward compatibility when importing libraries and resulting in an error when trying to use the “const miniCSEXTRACTPLUGIN = REQUIR” (‘mini-css-extract-plugin’ (‘mini-css-extract-plugin’) “, which, when switching to a new version, it was necessary to replace with” Const MinicsSextRactPlugin = Require (“Mini -css-extract-plugin “). Default.”
The problem was manifested in projects that do not apply explicit binding to the number number when the dependences is connected. As a workaround of solving the problem, it is recommended to fix the binding to last version 2.4.5 through the addition of ‘overrides “: {” MINI-CSS-Extract-Plugin “:” 2.4.5 “}’ in Yarn or using the” NPM i -D “command –save-evact [email protected] “in NPM.
Among the victims turned out to be Users developed by Facebook package Create-React-app that connects mini-css-extract-plugin as a dependency. Due to the lack of binding to the number of the MINI-CSS-Extract-Plugin version of the Create-React-App ended, Errors “Typeerror: MiniCSSextractPlugin Is Not a Constructor.” The problem also affected the packages @ WordPress / scripts , @ Auth0 / Auth0-SPA-JS , SQL-Formatter-GUI , LedGersMB , VIP-Go-Mu-plugins , Cybros , vue-clo , Chore etc.