Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 595 Bytes

invalid-getstaticprops-value.mdx

File metadata and controls

27 lines (20 loc) · 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:

export async function getStaticProps(ctx: {
    params?: ParsedUrlQuery;
    preview?: boolean;
    previewData?: PreviewData;
}) {
    return {
        props: { [key: string]: any }
    }
}

Useful Links