Repository navigation
Bug: Cannot create a build of the project #11931
Description
Activity
I can confirm having the same issue on a react app I created 1 hour ago. I can neither build or deploy.
I also can confirm having the same issue on a react app. I can neither build or deploy.
More info
#11930The temporary fix (mentioned in the issue) of editing the package.json to specify an earlier version of
mini-css-extract-pluginworked for me. Just remember to run yarn/npm install.I also can confirm having the same issue.
yeah, its still not working
Downgrading the version fixed it, add this into package.json.
"resolutions": { "mini-css-extract-plugin": "2.4.5" },
Reacted by bonndan and Christian AwelakoueHello, @ShernanJ I've added the code to my package.json and I'm still getting the TypeError.
@hamilton-mike try to delete your node_modules folder, While you still have the code above inside package.json, then reinstall your packages with
npm install.@ShernanJ still no bueno. getting the same error.
Same issue here.
What is weird : I can runnpm run startwithout problem (at least, all is not lost), butnpm run buildjust fails.
And yes, I've used the fixnpm i -D --save-exact mini-css-extract-plugin@2.4.5but the issue still remains and I've tried clearing the cache, reinstalling npm and so on.Resolutions only works if using yarn, see: #11930 (comment)
npm i -D --save-exact mini-css-extract-plugin@2.4.5andnpm installworked for me.I faced the same problem and shared the solution here #11934
Reacted by Michael H@iaseth thank you for the share.
Thank you @iaseth . For some reason,
@2.4.5would not work, but@2.4.6did the job.
The fixnpm install mini-css-extract-plugin@2.4.6was the one that worked for me.I ended up pinning
mini-css-extract-pluginto2.4.7which seemed to be the last version before2.5.0:"resolutions": { "mini-css-extract-plugin": "2.4.7" }I have tried all of these solutions and nothing seems to work for me. Does anyone else have ideas on how to fix the problem? I have deleted and refreshed everything but it still is not working. Tried the resolution / overrides / and adding it to my dependencies.
Hopefully they have a fix for this soon because I cant build any of my projects.
@garrettcfermo Try to edit your package.lock file according to the following database.
Then, use
npm ciinstead ofnpm install. This will fixate module version to 2.4.7."node_modules/react-scripts/node_modules/mini-css-extract-plugin": { "version": "2.4.7", "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.4.7.tgz", "integrity": "sha512-euWmddf0sk9Nv1O0gfeeUAvAkoSlWncNLF77C0TP2+WoPvy8mAHKOzMajcCz2dzvyt3CNgxb1obIEVFIRxaipg==", "dependencies": { "schema-utils": "^4.0.0" }, "engines": { "node": ">= 12.13.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/webpack" }, "peerDependencies": { "webpack": "^5.0.0" } },"mini-css-extract-plugin": { "version": "2.4.7", "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.4.7.tgz", "integrity": "sha512-euWmddf0sk9Nv1O0gfeeUAvAkoSlWncNLF77C0TP2+WoPvy8mAHKOzMajcCz2dzvyt3CNgxb1obIEVFIRxaipg==", "requires": { "schema-utils": "^4.0.0" }, "dependencies": { "ajv": { "version": "8.8.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.8.2.tgz", "integrity": "sha512-x9VuX+R/jcFj1DHo/fCp99esgGDWiHENrKxaCENuCxpoMCmAt/COCGVDwA7kleEpEzJjDnvh3yGoOuLu0Dtllw==", "requires": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2", "uri-js": "^4.2.2" } }, "ajv-keywords": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", "requires": { "fast-deep-equal": "^3.1.3" } }, "schema-utils": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", "requires": { "@types/json-schema": "^7.0.9", "ajv": "^8.8.0", "ajv-formats": "^2.1.1", "ajv-keywords": "^5.0.0" } } } },
React version: 17.0.2
Steps To Reproduce
npx create-react-app app-name(without Typescript)npm run build.The current behavior
You'll get an error about the
MiniCssExtractPlugin.The expected behavior
It should create a build version of the app 🙂