Nextjs, next-on-pages, "hanging Promise was canceled"

Hi all, I'm trying to build a statically rendered site on Pages using Next.

I have a dynamic route as follows: /app/(content)/articles/[slug] that will render content pulled from a headless CMS.

When I use
npm run dev
with Next, these routes work fine. but when I build the site with npx @cloudflare/next-on-pages@1 and then use wrangler to do a preview, it works for other non-dynamic pages but throws on the [slug] with:

A hanging Promise was canceled. This happens when the worker runtime is waiting for a Promise from JavaScript to resolve, but has detected that the Promise cannot possibly ever resolve because all code and events related to the Promise's I/O context have already finished.
✘ [ERROR] Uncaught (in response) Error: The script will never generate a response.

I've been trying to reduce to solve, and removed everything I can imagine so that I've literally got this as my page.js for the [slug] route:

export const runtime = 'edge';

export async function generateStaticParams() {
  return [{ slug: 'article-one'}, {slug: 'article-two'}];
}

export default async function articlePage() {
   return (
    <div>
      <div>Hello</div>   
    </div>
  )
}

Even that generates the hanging Promise error, which....I dont' get. I suspect I'm missing something with how generateStaticParams works with next-on-pages? Or...well, I don't know. That's why I'm here. šŸ™‚

Any ideas on why this page is not working, even when there are no outside calls/async functions (so to speak)?
Was this page helpful?