In nextjs app getting 500 for paths that havent been statically generated

When I create a brand new page in builder with a new url I get a 500. Up until recently I could create a new page and work on it without rebuilding the site. I think it’s probably something to do with nextjs, but I wanted to see if anybody here had any ideas. I think it’s because it’s not a static path because when I publish the page and rebuild the site everything works. I dont think anything was changed around that area in the next app.

How can I have the ability to create a new page in builder and work on it right away without rebuilding my nextjs app to rebuild the static paths?

// pages/[[...path]].tsx
export async function getStaticProps({ params }: GetStaticPropsContext<{ path: string[] }>) {
  const page = await resolveSwellContent("page", {
    urlPath: "/" + (params?.path?.join("/") || ""),
  })

  return {
    props: {
      page,
      ...(await getLayoutProps()),
    },
    // Next.js will attempt to re-generate the page:
    // - When a request comes in
    // - At most once every 30 seconds
    revalidate: 30,
  }
}

export async function getStaticPaths({ locales }: GetStaticPathsContext) {
  const pages = await builder.getAll("page", {
    options: { noTargeting: true },
    apiKey: builderConfig.apiKey,
  })

  return {
    paths: pages.map((page) => `${page.data?.url}`),
    fallback: true,
  }
}

Builder content link

Builder public api key
86c411b0ae7d404c8cdfbc782a799149

Code stack you are integrating Builder with
NextJS

Hi Sean!

Thanks for contacting us through the Builder.io forum.

Errors in the js console stating “Failed to load static props” probably means the next.js static path is not set up correctly. You may find help at Builder Next.js.

Let us know if you still have any concerns or questions. Thank you!