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

**URL:** <https://forum.builder.io/t/in-nextjs-app-getting-500-for-paths-that-havent-been-statically-generated/2297>\
**Category:** Technical Questions\
**Created:** [June 22, 2022, 4:35am UTC](https://forum.builder.io/t/in-nextjs-app-getting-500-for-paths-that-havent-been-statically-generated/2297 "2022-06-22T04:35:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![swinner](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/swinner/32/863_2.png) [@swinner](https://forum.builder.io/u/swinner)\
**Post date:** [June 22, 2022, 4:35am UTC](https://forum.builder.io/t/in-nextjs-app-getting-500-for-paths-that-havent-been-statically-generated/2297/1 "2022-06-22T04:35:41Z")

</div>

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?

```auto
// 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.io: Drag and drop page builder and CMS](https://builder.io/content/8503f42bb0814c6690865574a38ce360)**
>
> Build and optimize digital experiences for any tech stack, visually.

**Builder public api key**  
86c411b0ae7d404c8cdfbc782a799149

**Code stack you are integrating Builder with**  
NextJS

---

<div class="post-metadata">

**Author:** ![manish-sharma](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@manish-sharma](https://forum.builder.io/u/manish-sharma)\
**Post date:** [June 23, 2022, 1:55pm UTC](https://forum.builder.io/t/in-nextjs-app-getting-500-for-paths-that-havent-been-statically-generated/2297/2 "2022-06-23T13:55:27Z")

</div>

Hi Sean!

Thanks for contacting us through the [Builder.io](http://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](https://github.com/BuilderIO/nextjs-builder-edge-personalization/blob/main/pages/%5B%5B...path%5D%5D.tsx).

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