{"record":{"id":"8dcbc024d8b20e24","repo":"vercel/next.js","slug":"check-is-only-allowed-in-idle-status","errorCode":null,"errorMessage":"check() is only allowed in idle status","messagePattern":"check\\(\\) is only allowed in idle status","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/next/src/bundles/webpack/packages/HotModuleReplacement.runtime.js","lineNumber":261,"sourceCode":"\t\t\t\tpromise.then(unblock, unblock);\n\t\t\t\treturn promise;\n\t\t\tdefault:\n\t\t\t\treturn promise;\n\t\t}\n\t}\n\n\tfunction waitForBlockingPromises(fn) {\n\t\tif (blockingPromises === 0) return fn();\n\t\treturn new Promise(function (resolve) {\n\t\t\tblockingPromisesWaiting.push(function () {\n\t\t\t\tresolve(fn());\n\t\t\t});\n\t\t});\n\t}\n\n\tfunction hotCheck(applyOnUpdate) {\n\t\tif (currentStatus !== \"idle\") {\n\t\t\tthrow new Error(\"check() is only allowed in idle status\");\n\t\t}\n\t\treturn setStatus(\"check\")\n\t\t\t.then($hmrDownloadManifest$)\n\t\t\t.then(function (update) {\n\t\t\t\tif (!update) {\n\t\t\t\t\treturn setStatus(applyInvalidatedModules() ? \"ready\" : \"idle\").then(\n\t\t\t\t\t\tfunction () {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn setStatus(\"prepare\").then(function () {\n\t\t\t\t\tvar updatedModules = [];\n\t\t\t\t\tcurrentUpdateApplyHandlers = [];\n\n\t\t\t\t\treturn Promise.all(\n\t\t\t\t\t\tObject.keys($hmrDownloadUpdateHandlers$).reduce(function (","sourceCodeStart":243,"sourceCodeEnd":279,"githubUrl":"https://github.com/vercel/next.js/blob/0eb377541648e63402a47b38fee00a8d0ce8f8f1/packages/next/src/bundles/webpack/packages/HotModuleReplacement.runtime.js#L243-L279","documentation":"webpack HMR runtime state machine invariant inside hotCheck: module.hot.check() was invoked while the HMR status was not \"idle\" (e.g. a check already in progress). The status machine forbids overlapping checks, so the call is rejected rather than queued.","triggerScenarios":"Calling HotModuleReplacement.check() while the HMR runtime is not in idle status.","commonSituations":"A hot-update check is triggered while another update is already being applied or downloaded during next dev.","solutions":["Wait for the webpack HMR runtime to reach idle status before calling check(); this is an internal invariant and usually indicates a build tool bug — upgrade Next.js."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0eb377541648e63402a47b38fee00a8d0ce8f8f1","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}