# Agent-js does not work in Next.js SSG

**URL:** <https://forum.dfinity.org/t/agent-js-does-not-work-in-next-js-ssg/34090>\
**Category:** Developers\
**Created:** [August 11, 2024, 4:20pm UTC](https://forum.dfinity.org/t/agent-js-does-not-work-in-next-js-ssg/34090 "2024-08-11T16:20:36Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![anon74414410](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@anon74414410](https://forum.dfinity.org/u/anon74414410)\
**Post date:** [August 12, 2024, 6:34pm UTC](https://forum.dfinity.org/t/agent-js-does-not-work-in-next-js-ssg/34090/4 "2024-08-12T18:34:24Z")

</div>

I’d use `createSync` for SSG contexts as the simple fix, but the point is probably more to do with `fetch` or `syncTime` not working as intended.

I have another reported issue with the `syncTime` flow, so I’m going to dive into this and get back to you

---

_[View the full topic](https://forum.dfinity.org/t/agent-js-does-not-work-in-next-js-ssg/34090)._
