{"record":{"id":"4b511465665d40f2","repo":"vercel/next.js","slug":"route-workstore-route-used-apiname-inside-g","errorCode":null,"errorMessage":"Route ${workStore.route} used ${apiName} inside `generateStaticParams`, but the `${paramName}` parameter was not provided by a parent `generateStaticParams`. In `generateStaticParams`, root params are only available for segments nested below the segment that provides them.","messagePattern":"Route (.+?) used (.+?) inside `generateStaticParams`, but the `(.+?)` parameter was not provided by a parent `generateStaticParams`\\. In `generateStaticParams`, root params are only available for segments nested below the segment that provides them\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/next/src/server/request/root-params.ts","lineNumber":117,"sourceCode":"          return Promise.reject(err)\n        }\n      }\n      break\n    }\n    case 'private-cache': {\n      // In dev, private caches are persisted and keyed by root params (like\n      // public caches), so we track which ones were read.\n      if (workUnitStore.readRootParamNames) {\n        workUnitStore.readRootParamNames.add(paramName)\n      }\n      break\n    }\n    case 'prerender-runtime': {\n      break\n    }\n    case 'generate-static-params': {\n      if (!(paramName in workUnitStore.rootParams)) {\n        throw new Error(\n          `Route ${workStore.route} used ${apiName} inside \\`generateStaticParams\\`, but the \\`${paramName}\\` parameter was not provided by a parent \\`generateStaticParams\\`. In \\`generateStaticParams\\`, root params are only available for segments nested below the segment that provides them.`\n        )\n      }\n      break\n    }\n    default: {\n      workUnitStore satisfies never\n    }\n  }\n\n  accumulateRootVaryParam(paramName)\n  return Promise.resolve(workUnitStore.rootParams[paramName])\n}\n\nfunction createPrerenderRootParamPromise(\n  paramName: string,\n  workStore: WorkStore,\n  prerenderStore: PrerenderStoreLegacy | PrerenderStoreModernServer,","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/vercel/next.js/blob/0eb377541648e63402a47b38fee00a8d0ce8f8f1/packages/next/src/server/request/root-params.ts#L99-L135","documentation":"Error \"Route ${workStore.route} used ${apiName} inside `generateStaticParams`, but the `${paramName}` parameter was not provided by a parent `generateStaticParams`. In `generateStaticParams`, root params are only available for segments nested below the segment that provides them.\" thrown in vercel/next.js.","triggerScenarios":"generateStaticParams requests a root param not provided by a parent.","commonSituations":"Accessing a param from next/root-params that belongs to a segment above the current one.","solutions":["Return the param from a parent segment's generateStaticParams so nested segments can read it."],"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-14T00:17:10.932Z"}