rsnext/errors/invalid-getserversideprops-value.mdx

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
533 B
Text
Raw Normal View History

---
title: 'Invalid `getServerSideProps` Return Value'
---
## Why This Error Occurred
In one of the page's `getServerSideProps` the return value had the incorrect shape.
## Possible Ways to Fix It
Make sure to return the following shape from `getServerSideProps`:
```ts filename="pages/example.js"
export async function getServerSideProps(ctx: GetServerSidePropsContext) {
return {
props: { [key: string]: any }
}
}
```
## Useful Links
- [getServerSideProps](/docs/pages/api-reference/functions/get-server-side-props)