44d1a1cb15
This PR is part of a larger effort to migrate error messages to MDX and use App Router: https://github.com/vercel/front/pull/23459
23 lines
533 B
Text
23 lines
533 B
Text
---
|
|
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)
|