{"record":{"id":"0306f4d8adb47d44","repo":"vercel/next.js","slug":"failed-to-reload-dynamic-routes","errorCode":null,"errorMessage":"Failed to reload dynamic routes:","messagePattern":"Failed to reload dynamic routes:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/server/lib/router-utils/setup-dev-bundler.ts","lineNumber":1381,"sourceCode":"          const cacheLifeFilePath = path.join(distTypesDir, 'cache-life.d.ts')\n          writeCacheLifeTypes(opts.nextConfig.cacheLife, cacheLifeFilePath)\n\n          await writeRootParamsTypes(\n            routeTypesManifest,\n            path.join(distTypesDir, 'root-params.d.ts')\n          )\n        }\n\n        if (!resolved) {\n          resolve()\n          resolved = true\n        }\n      } catch (e) {\n        if (!resolved) {\n          reject(e)\n          resolved = true\n        } else {\n          Log.warn('Failed to reload dynamic routes:', e)\n        }\n      }\n    })\n\n    wp.watch({ directories: [dir], startTime: 0 })\n  })\n\n  const clientPagesManifestPath = `/_next/${CLIENT_STATIC_FILES_PATH}/development/${DEV_CLIENT_PAGES_MANIFEST}`\n  opts.fsChecker.devVirtualFsItems.add(clientPagesManifestPath)\n\n  const devMiddlewareManifestPath = `/_next/${CLIENT_STATIC_FILES_PATH}/development/${DEV_CLIENT_MIDDLEWARE_MANIFEST}`\n  opts.fsChecker.devVirtualFsItems.add(devMiddlewareManifestPath)\n\n  const devTurbopackMiddlewareManifestPath = `/_next/${CLIENT_STATIC_FILES_PATH}/development/${TURBOPACK_CLIENT_MIDDLEWARE_MANIFEST}`\n  opts.fsChecker.devVirtualFsItems.add(devTurbopackMiddlewareManifestPath)\n\n  async function requestHandler(req: IncomingMessage, res: ServerResponse) {\n    const parsedUrl = parseUrl(req.url || '/')","sourceCodeStart":1363,"sourceCodeEnd":1399,"githubUrl":"https://github.com/vercel/next.js/blob/258b1c1bc05f7099816b88f70b7b3422b24a4b8d/packages/next/src/server/lib/router-utils/setup-dev-bundler.ts#L1363-L1399","documentation":"Warning from the dev bundler's watch callback in setup-dev-bundler: the watcher promise for dynamic routes was already resolved when a file-change update threw. Because the initial setup already succeeded, the failure only invalidates this incremental reload of dynamic route definitions; it is caught and logged (with the error) rather than propagated, so dev keeps running with the previous routes.","triggerScenarios":"Thrown at packages/next/src/server/lib/router-utils/setup-dev-bundler.ts:1360 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the error in your dynamic routes (see accompanying error details) and let the dev server reload."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"258b1c1bc05f7099816b88f70b7b3422b24a4b8d","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}