Running next dev and next build together corrupted the .next folder, causing 500 errors
A Next.js developer found every page returning a 500 error over a missing Google font module. The cause was running next build while next dev was active, since both wrote to the same .next folder. Over time the shared folder accumulated 281 MB of mixed artifacts and Turbopack lost its font import table. Clearing the folder fixed the problem, but the developer chose a lasting fix instead: setting a separate output folder for each task via an environment variable. The dev server now uses .next-dev, the build keeps .next, and verification builds use .next-verify, and these folders should be added to .gitignore.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in