vercel/next.js · error · Error
apply() is only allowed in ready status (state: " + currentS
Error message
apply() is only allowed in ready status (state: " + currentStatus + ")
What it means
webpack HMR runtime state machine invariant inside hotApply: module.hot.apply() was called while the HMR status was not "ready", meaning no finished update was awaiting application. The rejected promise includes the actual currentStatus so callers can see which state they raced.
Source
Thrown at packages/next/src/bundles/webpack/packages/HotModuleReplacement.runtime.js:310
}, [])
).then(function () {
return waitForBlockingPromises(function () {
if (applyOnUpdate) {
return internalApply(applyOnUpdate);
}
return setStatus("ready").then(function () {
return updatedModules;
});
});
});
});
});
}
function hotApply(options) {
if (currentStatus !== "ready") {
return Promise.resolve().then(function () {
throw new Error(
"apply() is only allowed in ready status (state: " +
currentStatus +
")"
);
});
}
return internalApply(options);
}
function internalApply(options) {
options = options || {};
applyInvalidatedModules();
var results = currentUpdateApplyHandlers.map(function (handler) {
return handler(options);
});
currentUpdateApplyHandlers = undefined;View on GitHub (pinned to 0eb3775416)
Solutions
- Only call apply() when the HMR runtime status is ready; internal invariant — upgrade Next.js or report the state mismatch.
Defensive patterns
Strategy: validation
When it happens
Trigger: Calling HotModuleReplacement.apply() when the HMR runtime status is not ready.
Common situations: An HMR update is applied before the check/download phase finished, typically during rapid edits in next dev.
AI-assisted analysis of vercel/next.js@0eb3775416 (2026-08-19).
Data as JSON: /api/errors/fd7007bedf504ee4.
Report an issue: GitHub.