Skip to content

TypeError: Cannot read properties of undefined (reading 'document') #52

@aanavp

Description

@aanavp

TypeError: Cannot read properties of undefined (reading 'document')

This error happened while generating the page. Any console logs will be displayed in the terminal window.
Source
services\index.js (144:9) @ getPosts

142 | const result = await request(graphqlAPI, query, { slug, createdAt });
143 |

144 | return { next: result.next[0], previous: result.previous[0] };
| ^
145 | };
146 |
147 | export const getCategoryPost = async (slug) => {
Call Stack
getStaticProps
pages\index.js (30:31)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions