Vercel deploy error

June 30, 2024

Main topic

I have headless blog powered by Next.js from Vercel's template (https://vercel.com/templates/next.js/portfolio-starter-kit). I use VSCode to add new MDX files, and it worked normally until yesterday, when I pushed to Git, and Vercel Deployment Details showed the error "Error: Cannot apply unknown utility class: dark:"

In the afternoon yesterday, I felt terrible, and I don't know why.

In file global.css, there were some lines with 'dark: ' followed by a [space] which cause the error. This happened because when I used VSCode, it automatically added [space] fater the colon without me realizing it.

Is there anything else fun today?

I think the best fun thing today is that I found the reason for this error and was able to fix it!

Keywords: Headless blog, Next.js, Vercel, Visual Studio Code, MDX files, Git push, error, global.css, dark utility class, space character, fix error.