Next.js Discord

Discord Forum

App throwing error only on production server

Answered
Giant panda posted this in #help-forum
Open in Discord
Giant pandaOP
It only happens when running on my ubuntu server, if I run product build locally it works just fine. Any idea?
Please find the below error:
0|prana-server  | TypeError: fetch failed
0|prana-server  |     at Object.fetch (/var/www/pranachillingspace.com/server/node_modules/next/dist/compiled/undici/index.js:1:26669)
0|prana-server  |     at invokeRequest (/var/www/pranachillingspace.com/server/node_modules/next/src/server/lib/server-ipc/invoke-request.ts:22:10)
0|prana-server  |     at handleRoute (/var/www/pranachillingspace.com/server/node_modules/next/src/server/lib/router-utils/resolve-routes.ts:463:31)
0|prana-server  |     at resolveRoutes (/var/www/pranachillingspace.com/server/node_modules/next/src/server/lib/router-utils/resolve-routes.ts:718:22)
0|prana-server  |     at handleRequest (/var/www/pranachillingspace.com/server/node_modules/next/src/server/lib/router-server.ts:475:11)
0|prana-server  |     at requestHandler (/var/www/pranachillingspace.com/server/node_modules/next/src/server/lib/router-server.ts:695:7)
0|prana-server  |     at Server.<anonymous> (/var/www/pranachillingspace.com/server/node_modules/next/src/server/lib/start-server.ts:112:7) {
0|prana-server  |   cause: SocketError: other side closed
0|prana-server  |       at Socket.onSocketEnd (/var/www/pranachillingspace.com/server/node_modules/next/dist/compiled/undici/index.js:1:63301)
0|prana-server  |       at Socket.emit (node:events:402:35)
0|prana-server  |       at endReadableNT (node:internal/streams/readable:1343:12)
0|prana-server  |       at processTicksAndRejections (node:internal/process/task_queues:83:21) {
Answered by Giant panda
Upgrading to node 18 from 16 fixes it (this happened after upgrading next from 13.3 to 13.4)
View full answer

1 Reply

Giant pandaOP
Upgrading to node 18 from 16 fixes it (this happened after upgrading next from 13.3 to 13.4)
Answer