next.js/errors/invalid-getserversideprops-value.mdx
invalid-getserversideprops-value.mdx24 lines535 B
---
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)
Quest for Codev2.0.0
/
SIGN IN