vercel/next.js · error
Found a change in ${path.basename(filename)}. Restarting the
Error message
Found a change in ${path.basename(filename)}. Restarting the server to apply the changes... What it means
Warning from the dev server's Watchpack file watcher in startServer: it watches next.config.js and related CONFIG_FILES, and when one of them changes on disk the running server cannot apply the new configuration in place. It therefore logs this warning and restarts the dev server so the new config is picked up.
Source
Thrown at packages/next/src/server/lib/start-server.ts:592
break
}
dirWatchPaths.push(nextAncestor)
prevAncestor = nextAncestor
}
const configFiles = CONFIG_FILES.map((file) => path.join(dir, file))
const Watchpack =
require('next/dist/compiled/watchpack') as typeof import('next/dist/compiled/watchpack').default
const wp = new Watchpack()
wp.watch({
files: configFiles,
missing: dirWatchPaths,
})
wp.on('change', async (filename) => {
if (!configFiles.includes(filename)) {
return
}
Log.warn(
`Found a change in ${path.basename(
filename
)}. Restarting the server to apply the changes...`
)
process.exit(RESTART_EXIT_CODE)
})
wp.on('remove', (removedPath: string) => {
if (dirWatchPaths.includes(removedPath)) {
Log.error(
`The directory at "${removedPath}" was deleted.\n\n` +
'Deleting this directory while Next.js is running can lead to ' +
'undefined behavior. Restarting the server to recover...'
)
process.exit(RESTART_EXIT_CODE)
}
})
}
View on GitHub (pinned to 89d017eac4)
Solutions
- No action needed; the server restarted to apply the config change.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at packages/next/src/server/lib/start-server.ts:592 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of vercel/next.js@89d017eac4 (2026-08-19).
Data as JSON: /api/errors/5556c2a4feceb494.
Report an issue: GitHub.