What version of Next.js are you using? We've seen some fetching issues in recent Next.js versions (around v13 specifically). Could you try updating to the latest version of Next.js and see if the error persists?
Given that you're seeing an ECONNRESET error, I suspect that the error is in your app or on your network. Are you getting the error locally or when you build the project in production?
If it's local, is it possible you have network configurations — such as a VPN or firewall — that could be causing problems?
⨯ TypeError: fetch failed
at async RootLayout (./src/app/layout.tsx:27:24)
Cause: Error: read ECONNRESET
at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20)
at TLSWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -54,
code: 'ECONNRESET',
syscall: 'read'
}
⨯ TypeError: fetch failed
at async RootLayout (./src/app/layout.tsx:27:24)
digest: "1573418083"
I'm using "next": "14.1.4", and the newest versions of Prismic / Slicemachine.
I don't have any VPN or firewall configuration and the internet connection is stable. The error only appears locally. Any idea what could be the cause?
After several reloading it sometimes works - and then, the error appears again.