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)
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 |