-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
create-block's css fails to build due to a ModuleBuildError with postcss #31361
Comments
I investigated it a bit and it looks like I'm about to open a patch. |
#31364 didn't help. There is something else that forces |
It's a very strange issue related to how I see that |
In my testing, everything works properly when using npm 7. It looks like it's a very specific bug in npm 6 that was resolved in npm 7 when they change how peer dependencies work 🤷🏻 This issue should self-resolve when |
Thank you for your assistance @gziolo For anyone else encountering this, I was able to resolve this and use create-block again by: upgrading to node 15 (which includes npm 7) |
Updating node to 15.14.0 (from 14) solved the issue for me. |
Description
I was working on a custom-block that I had made using create-block, ran
npm packages updates
on it; then rannpm run start
on my block, and began receiving the same error that I posted below.I was able to reproduce by creating a new block using create-block from scratch, so my hunch is that there's a regression introduced by the newest version of wordpress/scripts today
perhaps it's an error with the newly updated postcss-plugins-preset (https://github.com/WordPress/gutenberg/blob/ddb946674120ec27de94391b313f6bdfec64da6a/packages/postcss-plugins-preset/CHANGELOG.md#300-2021-04-29) ?
Step-by-step reproduction instructions
npx @wordpress/create-block test-block-2
Expected behaviour
The block builds successfully and I would able to run npm run start in the new block's directory; and load the block in the editor.
Actual behaviour
This is the output of npx @wordpress/create-block test-block-2`
I've included part of the error message below.
ERROR in ./src/style.scss Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js): Error: [object Object] is not a PostCSS plugin at Processor.normalize
When I run
npm run start
inside the directory of my newly created block, I receive the same error message, here it is in fullI received the same exact error message when I run
npm run start
after I had runnpm packages updates
in my custom block as well.WordPress information
Device information
Ubuntu 18.04; using nvm, but my node is v12.20.0; npm 6.14.11
The text was updated successfully, but these errors were encountered: