Next.js Build failed because of webpack errors: CssSyntaxError #7395
-
SummaryI've been stuck and going all over internet trying to figure something that prevents my app to be build on Vercell (well locally as well).
The error comes from css-minimizer-plugin and is CssSyntaxError: Unknown word. My question is - since it only shows location of the error inside static\css\363329e5478d19a3.css which gets immediately deleted when build fails - how on earth i can figure out what is the issue (what line of code in which file?) ExampleNo response Steps to Reproduce
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
It looks like this is happening locally too, so not entirely a Vercel issue. However, I recommend reviewing your CSS/SCSS files for syntax errors or invalid properties. Common mistakes include missing semicolons, misplaced braces, or incorrect property names. When I hit issues like this, I also like commenting out bits of code and re-building until I identify the piece that is causing issues. Let us know how you get on! Good luck! |
Beta Was this translation helpful? Give feedback.
-
I faced the same issue and solved it. See solution on Stack Overflow |
Beta Was this translation helpful? Give feedback.
-
This discussion was automatically locked because the community moved to a new site. Please join us at vercel.community |
Beta Was this translation helpful? Give feedback.
I faced the same issue and solved it.
See solution on Stack Overflow