silverwolf-x/project / errors /invalid-getstaticprops-value.mdx
silverwolf-x's picture
download
raw
595 Bytes
---
title: 'Invalid `getStaticProps` Return Value'
---
## Why This Error Occurred
In one of the page's `getStaticProps` the return value had the incorrect shape.
## Possible Ways to Fix It
Make sure to return the following shape from `getStaticProps`:
```tsx filename="pages/example.tsx"
export async function getStaticProps(ctx: {
params?: ParsedUrlQuery;
preview?: boolean;
previewData?: PreviewData;
}) {
return {
props: { [key: string]: any }
}
}
```
## Useful Links
- [`getStaticProps` Documentation](/docs/pages/api-reference/functions/get-static-props)

Xet Storage Details

Size:
595 Bytes
·
Xet hash:
64d26b586b6d96d04afe425dd0ba63e85823bdace2ddf3e1c9e239fb1c757d07

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.