{"record":{"id":"f10a59e3b5a744a8","repo":"gatsbyjs/gatsby","slug":"gatsby-slice-api-could-not-find-values-in-fil","errorCode":null,"errorMessage":"[Gatsby Slice API] Could not find values in \"${filename}${locationInFile}\" for the following props at build time: ${unresolvedProps.join(`, `)}","messagePattern":"\\[Gatsby Slice API\\] Could not find values in \"(.+?)(.+?)\" for the following props at build time: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby/src/utils/babel/find-slices.ts","lineNumber":81,"sourceCode":"        SLICES_PROPS\n      ) as { alias: string; allowEmpty?: boolean }\n\n      const { alias: name, allowEmpty = false } = props\n\n      if (unresolvedProps.length) {\n        let locationInFile = ``\n        if (nodePath.node.loc?.start?.line) {\n          locationInFile = `:${nodePath.node.loc.start.line}`\n          if (nodePath.node.loc?.start?.column) {\n            locationInFile += `:${nodePath.node.loc.start.column + 1}`\n          }\n        }\n\n        const error = `[Gatsby Slice API] Could not find values in \"${filename}${locationInFile}\" for the following props at build time: ${unresolvedProps.join(\n          `, `\n        )}`\n\n        reporter.warn(error)\n        return\n      }\n\n      if (name) {\n        result[name] = mergePreviouslyCollectedSlice(\n          { name, allowEmpty },\n          result[name]\n        )\n        hasResults = true\n      }\n    },\n  })\n\n  return hasResults ? result : null\n}\n","sourceCodeStart":63,"sourceCodeEnd":97,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby/src/utils/babel/find-slices.ts#L63-L97","documentation":"Babel-time warning from the Slice API static analysis: props on a slice JSX element could not be evaluated at build time (dynamic values). The message includes the file and line:column of the offending element, which is the input at fault.","triggerScenarios":"Thrown at packages/gatsby/src/utils/babel/find-slices.ts:81 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass the slice's props (e.g. alias) as static string literals in JSX"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e85d62f1779e353eaac1753211629a26d123e26c","analyzedAt":"2026-08-26T17:50:09.662Z","contentChangedAt":"2026-08-26T17:50:09.662Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}