# Nextjs runtime v5 error build

**URL:** <https://answers.netlify.com/t/nextjs-runtime-v5-error-build/116114>\
**Category:** Support\
**Tags:** deployment, building, nextjs\
**Created:** [April 8, 2024, 10:34am UTC](https://answers.netlify.com/t/nextjs-runtime-v5-error-build/116114 "2024-04-08T10:34:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sahcaven](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/sahcaven/32/58575_2.png) [@sahcaven](https://answers.netlify.com/u/sahcaven)\
**Post date:** [April 8, 2024, 10:34am UTC](https://answers.netlify.com/t/nextjs-runtime-v5-error-build/116114/1 "2024-04-08T10:34:32Z")

</div>

Hi,  
We noticed that today builds started failing due to new Nextjs Runtime. We have a static export of the site and it seems the flag in the ENV variables is not working. Our site is [https://sahcaven.netlify.app/](https://sahcaven.netlify.app/). We use 14.1.0 version of Nextjs. What can we do to disable nextjs runtime?  
Thanks in advance!

---

<div class="post-metadata">

**Author:** ![sahcaven](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/sahcaven/32/58575_2.png) [@sahcaven](https://answers.netlify.com/u/sahcaven)\
**Post date:** [April 8, 2024, 12:11pm UTC](https://answers.netlify.com/t/nextjs-runtime-v5-error-build/116114/2 "2024-04-08T12:11:24Z")

</div>

solved it by following this docs: [Next.js 13.5+ on Netlify | Netlify Docs](https://docs.netlify.com/frameworks/next-js/overview/#pin-an-older-version-of-next-js-runtime-to-your-site)

---

<div class="post-metadata">

**Author:** ![Melvin](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/melvin/32/23606_2.png) [@Melvin](https://answers.netlify.com/u/Melvin)\
**Post date:** [April 8, 2024, 12:16pm UTC](https://answers.netlify.com/t/nextjs-runtime-v5-error-build/116114/3 "2024-04-08T12:16:10Z")

</div>

Hi @sahcaven,

Thanks for reaching out and welcome to Netlify’s Support Forums!

Sorry about the issue with building while using Netlify/Next.js runtime v5.

Could you try using the suggest build commands mentioned here:

> **[Next.js 13.5+ on Netlify](https://docs.netlify.com/frameworks/next-js/overview/#suggested-configuration-values)**
>
> Learn about Next.js on our platform. Use App Router, automatic fine-grained caching, image optimization, and more with Next.js 13.5+ on Netlify.

> When you [link a repository](https://docs.netlify.com/welcome/add-new-site/#import-from-an-existing-repository) for a Next.js project, Netlify provides a suggested build command and publish directory: `next build` and `.next` .

To see if your site builds properly with the Netlify/Next.js runtime v5.

If you do decide to stay with Netlify Next.js Runtime v4.41.3, you’ll want to downgrade Next.js to a version below 13.5. v4.41.3 is meant for version less than 13.5, while version 5 of the runtime is meant for Next.js version above 13.5 (such as 14.1.0).
