{"record":{"id":"ea7d9569c9a295df","repo":"vercel/next.js","slug":"hmr-unexpected-require-module-id-to-disposed","errorCode":null,"errorMessage":"[HMR] unexpected require(${module.id}) to disposed module","messagePattern":"\\[HMR\\] unexpected require\\((.+?)\\) to disposed module","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/bundles/webpack/packages/JavascriptHotModuleReplacement.runtime.js","lineNumber":112,"sourceCode":"\t\t\t\toutdatedDependencies: outdatedDependencies\n\t\t\t};\n\t\t}\n\n\t\tfunction addAllToSet(a, b) {\n\t\t\tfor (var i = 0; i < b.length; i++) {\n\t\t\t\tvar item = b[i];\n\t\t\t\tif (a.indexOf(item) === -1) a.push(item);\n\t\t\t}\n\t\t}\n\n\t\t// at begin all updates modules are outdated\n\t\t// the \"outdated\" status can propagate to parents if they don't accept the children\n\t\tvar outdatedDependencies = {};\n\t\tvar outdatedModules = [];\n\t\tvar appliedUpdate = {};\n\n\t\tvar warnUnexpectedRequire = function warnUnexpectedRequire(module) {\n\t\t\tconsole.warn(\n\t\t\t\t\"[HMR] unexpected require(\" + module.id + \") to disposed module\"\n\t\t\t);\n\t\t};\n\n\t\tfor (var moduleId in currentUpdate) {\n\t\t\tif ($hasOwnProperty$(currentUpdate, moduleId)) {\n\t\t\t\tvar newModuleFactory = currentUpdate[moduleId];\n\t\t\t\t/** @type {TODO} */\n\t\t\t\tvar result = newModuleFactory\n\t\t\t\t\t? getAffectedModuleEffects(moduleId)\n\t\t\t\t\t: {\n\t\t\t\t\t\t\ttype: \"disposed\",\n\t\t\t\t\t\t\tmoduleId: moduleId\n\t\t\t\t\t\t};\n\t\t\t\t/** @type {Error|false} */\n\t\t\t\tvar abortError = false;\n\t\t\t\tvar doApply = false;\n\t\t\t\tvar doDispose = false;","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/vercel/next.js/blob/0eb377541648e63402a47b38fee00a8d0ce8f8f1/packages/next/src/bundles/webpack/packages/JavascriptHotModuleReplacement.runtime.js#L94-L130","documentation":"In the JavaScript HMR runtime, warnUnexpectedRequire is called for modules that still require a disposed module after an update has been applied; it logs this warning to flag outdated references to replaced modules rather than throwing.","triggerScenarios":"Thrown at packages/next/src/bundles/webpack/packages/JavascriptHotModuleReplacement.runtime.js:112 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reload the page; the module graph changed and an old module reference was used after disposal."],"exampleFix":null,"handlingStrategy":"fallback","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-14T00:17:10.932Z"}