Issue
While working on my NextJS project, I've been experiencing occasional disruptions with my development server. Whenever I update my code, I encounter random occurrences of the dev server disconnecting and displaying the error message below:
TypeError: fetch failed
at Object.fetch (D:\vsc\msaf-next\node_modules\next\dist\compiled\undici\index.js:1:26669)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async invokeRequest (D:\vsc\msaf-next\node_modules\next\dist\server\lib\server-ipc\invoke-request.js:17:12)
at async invokeRender (D:\vsc\msaf-next\node_modules\next\dist\server\lib\router-server.js:254:29)
at async handleRequest (D:\vsc\msaf-next\node_modules\next\dist\server\lib\router-server.js:447:24)
at async requestHandler (D:\vsc\msaf-next\node_modules\next\dist\server\lib\router-server.js:464:13)
at async Server.<anonymous> (D:\vsc\msaf-next\node_modules\next\dist\server\lib\start-server.js:117:13) {
cause: Error: connect ECONNREFUSED 127.0.0.1:53023
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1247:16) {
errno: -4078,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 53023
}
}
I'm using NextJS version 13.4.19 and Javascript for this project. I haven't attempted to troubleshoot yet as I'm unsure where to begin. If you have any insights, solutions, or if you've encountered a similar problem, please share with me.