{"record":{"id":"498c7073b620f6d4","repo":"gatsbyjs/gatsby","slug":"slice-concreteslicename-for-slicename-sl-498c70","errorCode":null,"errorMessage":"Slice \"${concreteSliceName}\" for \"${sliceName}\" slot not found","messagePattern":"Slice \"(.+?)\" for \"(.+?)\" slot not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby/cache-dir/slice/server-slice.js","lineNumber":29,"sourceCode":"  const propsString = createContentDigest(sliceProps)\n  return `${sliceName}-${propsString}`\n}\n\nexport const ServerSlice = ({\n  sliceName,\n  allowEmpty,\n  children,\n  ...sliceProps\n}) => {\n  const slicesMap = useContext(SlicesMapContext)\n  const slicesProps = useContext(SlicesPropsContext)\n  const concreteSliceName = slicesMap[sliceName]\n\n  if (!concreteSliceName) {\n    if (allowEmpty) {\n      return null\n    } else {\n      throw new Error(\n        `Slice \"${concreteSliceName}\" for \"${sliceName}\" slot not found`\n      )\n    }\n  }\n\n  const sliceId = getSliceId(concreteSliceName, sliceProps)\n\n  // set props on context object for static-entry to return\n  let sliceUsage = slicesProps[sliceId]\n  if (!sliceUsage) {\n    slicesProps[sliceId] = sliceUsage = {\n      props: sliceProps,\n      sliceName: concreteSliceName,\n      hasChildren: !!children,\n    }\n  } else {\n    if (children) {\n      sliceUsage.hasChildren = true","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/8b06340921ffdf23125a365b9c9923690cb62ce6/packages/gatsby/cache-dir/slice/server-slice.js#L11-L47","documentation":"Thrown by ServerSlice (the SSR Slice renderer) when slicesMap[sliceName] is falsy — meaning the slice alias used in <Slice alias='...' /> has no mapping to a concrete slice component name. Unlike the inline-slice variant (117), this fires at the mapping lookup stage, before any result is fetched, indicating the alias was never registered.","triggerScenarios":"During server-side rendering, an <Slice alias='header' /> is rendered, but slicesMap['header'] returns undefined. This means the slice alias was not registered in the SlicesMapContext, typically because defineSlice was never called for that alias or the alias string has a typo.","commonSituations":"Typo in the alias prop, a slice defined in one Gatsby environment but not another, the slice registration in gatsby-node.js is conditional and didn't execute, or the SlicesMapContext wasn't populated due to a build error.","solutions":["Verify the alias in <Slice alias='...' /> exactly matches a defineSlice call in gatsby-node.js.","Ensure defineSlice runs unconditionally (not inside a conditional that might be skipped).","Check build output for slice registration — the slice name should appear in the generated slices map.","If the slice is truly optional, pass allowEmpty={true} to suppress the error."],"exampleFix":"// before — alias not registered\n// gatsby-node.js defines: defineSlice('header', component)\n// but page uses:\n<Slice alias=\"Header\" />  // case mismatch\n\n// after — exact alias match\n<Slice alias=\"header\" />","handlingStrategy":"validation","validationCode":"// Verify slice alias is registered before SSR\nimport { SlicesMapContext } from './slice/context'\n\nfunction useRegisteredSliceName(alias) {\n  const slicesMap = React.useContext(SlicesMapContext)\n  const concrete = slicesMap[alias]\n  if (!concrete) {\n    console.warn(`Slice alias \"${alias}\" is not registered in slices map`)\n    return null\n  }\n  return concrete\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Ensure defineSlice is called for every alias used in <Slice>.","Double-check alias spelling and casing.","Make defineSlice calls unconditional in gatsby-node.js.","Use allowEmpty={true} for optional slices to avoid SSR crashes."],"tags":["slices","server-slice","ssr","slices-map","alias","registration"],"backgroundTag":null,"analyzedSha":"8b06340921ffdf23125a365b9c9923690cb62ce6","analyzedAt":"2026-08-13T02:36:21.405Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}