Files
vercel__next.js/errors/invalid-getserversideprops-value.mdx
Jam Balaya 7fe9065917 docs: typo file extension (#72272)
## Summary
Change [language and
filename](https://nextjs.org/docs/canary/community/contribution-guide#language-and-filename)
for match code block language.

### Improving Documentation

- [x] Run `pnpm prettier-fix` to fix formatting issues before opening
the PR.
- [x] Read the Docs Contribution Guide to ensure your contribution
follows the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2024-11-04 23:16:21 +00:00

24 lines
535 B
Plaintext

---
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`:
```tsx filename="pages/example.tsx"
export async function getServerSideProps(ctx: GetServerSidePropsContext) {
return {
props: { [key: string]: any }
}
}
```
## Useful Links
- [getServerSideProps](/docs/pages/api-reference/functions/get-server-side-props)