-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"TypeError: MiniCssExtractPlugin is not a constructor" in fresh wp-scripts installation #37992
Comments
Another way to reproduce:
Been fighting with this one all afternoon. Tried rolling back to 19.2.1, no dice. Me thinks something updated today that broke a webpack plugin. Interesting note: this error only shows up on yarn classic. yarn berry fails silently. Ruined my pipelines today. |
So you have still no solution other then using oder version of create-block? |
When I run build in the project.
|
Downgrade @wordpress/scripts for now. A project that uses v12 built fine for me just now |
mini-css-extract-plugin was update 5 hours ago. @see webpack-contrib/mini-css-extract-plugin#896 Temporary work around:
Add that to your package.json. |
@jonshipman I start with a fresh |
I had the same problem, downgrade |
@ivanjeremic why did you choose v12? It is quite old. |
Thats what worked for me. |
Just found out |
This is an issue with the npm package not following semantic versioning, which might happen accidentally. I commented under the issue they already had filed: webpack-contrib/mini-css-extract-plugin#896 (comment). Let’s see if they publish a quick follow-up bugfix release, or we need to land the patch opened by @fabiankaegy: #38004. |
@gziolo Has a decision been made regarding this? |
I have just merged #38004. I will cherry-pick the commit and run npm publishing. |
I have just published a bug fix for
|
It's now also fixed upstream as noted in webpack-contrib/mini-css-extract-plugin#896 (comment). There is also a note left important for us:
We will need a follow-up in |
I can add a follow up PR :) |
But our workaround still works! |
Description
I get this on a fresh install what can be the issue?
Step-by-step reproduction instructions
'npx @wordpress/create-block gutenpride'
Screenshots, screen recording, code snippet
No response
Environment info
node version v16.13.1
npm version 8.1.2
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: