Unverified Commit 02a429ae authored by Benjamin Woodruff ‮'s avatar Benjamin Woodruff Committed by GitHub

Dev server: More aggresively scold users for deleting .next when we detect it…

Dev server: More aggresively scold users for deleting .next when we detect it while dev is running (#98253)

Feedback:
https://vercel.slack.com/archives/C03KAR5DCKC/p1788491653257349?thread_ts=1788490509.032699&cid=C03KAR5DCKC

Message was added in https://github.com/vercel/next.js/pull/92135

We can't detect this in most other cases where users (or agents tbh)
delete `.next`, but in this case we can.
parent 705b3269
......@@ -600,6 +600,8 @@ export async function startServer(
if (dirWatchPaths.includes(removedPath)) {
Log.error(
`The directory at "${removedPath}" was deleted.\n\n` +
'Deleting this directory removes caches and will cause slower ' +
'performance.\n\n' +
'Deleting this directory while Next.js is running can lead to ' +
'undefined behavior. Restarting the server to recover...'
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment