Next.js Discord

Discord Forum

TypeError: fetch failed

Answered
Alaskan Husky posted this in #help-forum
Open in Discord
Avatar
Alaskan HuskyOP
Hi there, I'm using NextJS 13 app dir with Prisma.
I'm able to run the dev server without problems, but after a while it breaks with the following error.

Has anyone seen this?

TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11413:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async invokeRequest (/Users/rafa/repos/growinco/node_modules/.pnpm/next@13.4.19_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/lib/server-ipc/invoke-request.js:17:12)
    at async invokeRender (/Users/rafa/repos/growinco/node_modules/.pnpm/next@13.4.19_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/lib/router-server.js:254:29)
    at async handleRequest (/Users/rafa/repos/growinco/node_modules/.pnpm/next@13.4.19_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/lib/router-server.js:447:24)
    at async requestHandler (/Users/rafa/repos/growinco/node_modules/.pnpm/next@13.4.19_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/lib/router-server.js:464:13)
    at async Server.<anonymous> (/Users/rafa/repos/growinco/node_modules/.pnpm/next@13.4.19_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/lib/start-server.js:117:13) {
  cause: Error: connect ECONNREFUSED ::1:54340
      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16) {
    errno: -61,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '::1',
    port: 54340
  }
}
Image
Answered by joulev
This is a known 13.4.13+ bug
View full answer

3 Replies

Avatar
joulev
Try 13.5.1, if it doesn’t work the downgrade to 13.4.12
Avatar
joulev
This is a known 13.4.13+ bug
Answer
Avatar
Alaskan HuskyOP
thanks for such a quick response @joulev !!!