New Netlify runtime breaks Next.js
A few days ago, I’ve added one note and discovered that content pages on my site are not available anymore.
After a local testing I understood that locally everything is fine and there is something with Netlify infrastructure.
It seems that Netlify Next.js runtime v5 breaks pre Next 13.5 sites.
How to fix
- Create
netlify.toml
file at the root of the project with following content:
[[plugins]]
package = "@netlify/plugin-nextjs"
- Install Netlify’s Next.js runtime v4:
npm i @netlify/plugin-nextjs@4
After these steps, Next.js should work as intended.
P.S. Netlify probably notified users about their new runtime, but I somehow missed this.