vercel/next.js · error

Warning: Failed to re-render. We will retry on the next Fast

Error message

Warning: Failed to re-render. We will retry on the next Fast Refresh event.
${err}

What it means

In react-refresh-utils' applyUpdate (scheduled by scheduleUpdate), performReactRefresh() runs inside try/catch; if the React refresh runtime throws while re-rendering after a hot update, this warning is logged and the update is retried on the next Fast Refresh event instead of crashing.

Source

Thrown at packages/react-refresh-utils/internal/helpers.ts:171

var isUpdateScheduled: boolean = false
// This function aggregates updates from multiple modules into a single React Refresh call.
function scheduleUpdate() {
  if (isUpdateScheduled) {
    return
  }
  isUpdateScheduled = true

  function canApplyUpdate(status: ModuleHotStatus) {
    return status === 'idle'
  }

  function applyUpdate() {
    isUpdateScheduled = false
    try {
      RefreshRuntime.performReactRefresh()
    } catch (err) {
      console.warn(
        'Warning: Failed to re-render. We will retry on the next Fast Refresh event.\n' +
          err
      )
    }
  }

  if (canApplyUpdate(module.hot.status())) {
    // Apply update on the next tick.
    Promise.resolve().then(() => {
      applyUpdate()
    })
    return
  }

  const statusHandler = (status) => {
    if (canApplyUpdate(status)) {
      module.hot.removeStatusHandler(statusHandler)
      applyUpdate()

View on GitHub (pinned to 0eb3775416)

Solutions

  1. Fix the reported error in your code; Fast Refresh will retry rendering on the next edit.
  2. If stuck, do a full page reload.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at packages/react-refresh-utils/internal/helpers.ts:171 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of vercel/next.js@0eb3775416 (2026-08-19). Data as JSON: /api/errors/2bcc183db707a419. Report an issue: GitHub.