Aerilym
Aerilym
TtRPC
Created by Aerilym on 11/8/2024 in #❓-help
Dockerized Next.JS Error [TRPCClientError] INTERNAL_SERVER_ERROR
Env: Docker | Node 22 | Next.JS | pnpm Everything works fine outside of docker, I can create the build and start it in the same way, but it seems to break when run inside docker
❯ docker run -p 3000:3000 my-nextjs-app
▲ Next.js 15.0.2
- Local: http://localhost:3000
- Network: http://0.0.0.0:3000

✓ Starting...
✓ Ready in 242ms
[TRPC] interest.getStats took 41ms to execute
[Error [TRPCError]: ] {
code: 'INTERNAL_SERVER_ERROR',
[cause]: [AggregateError: ] { code: 'ECONNREFUSED' }
}
[TRPC] interest.getStats took 16ms to execute
<< query #1 interest.getStats {
input: undefined,
result: Error [TRPCClientError]:
at o.from (/app/.next/server/chunks/956.js:3:94182)
at <unknown> (/app/.next/server/chunks/956.js:3:101075) {
meta: {
response: Response {
status: 200,
statusText: 'OK',
headers: Headers {
vary: 'RSC, Next-Router-State-Tree, Next-Router-Prefetch, Next-Router-Segment-Prefetch',
'content-type': 'application/json',
'transfer-encoding': 'chunked',
date: 'Fri, 08 Nov 2024 03:33:10 GMT',
connection: 'keep-alive',
'keep-alive': 'timeout=5'
},
body: ReadableStream { locked: true, state: 'readable', supportsBYOB: true },
bodyUsed: true,
ok: true,
redirected: false,
type: 'basic',
url: 'http://localhost:3000/api/trpc/interest.getStats?batch=1&input=%7B%220%22%3A%7B%22json%22%3Anull%2C%22meta%22%3A%7B%22values%22%3A%5B%22undefined%22%5D%7D%7D%7D'
}
},
shape: { message: '', code: -32603, data: [Object] },
data: {
code: 'INTERNAL_SERVER_ERROR',
httpStatus: 500,
path: 'interest.getStats',
zodError: null
}
},
elapsedMs: 55
}
⨯ Error [TRPCClientError]:
at o.from (/app/.next/server/chunks/956.js:3:94182)
at <unknown> (/app/.next/server/chunks/956.js:3:101075) {
meta: [Object],
shape: [Object],
data: [Object],
digest: '1300227502'
}
❯ docker run -p 3000:3000 my-nextjs-app
▲ Next.js 15.0.2
- Local: http://localhost:3000
- Network: http://0.0.0.0:3000

✓ Starting...
✓ Ready in 242ms
[TRPC] interest.getStats took 41ms to execute
[Error [TRPCError]: ] {
code: 'INTERNAL_SERVER_ERROR',
[cause]: [AggregateError: ] { code: 'ECONNREFUSED' }
}
[TRPC] interest.getStats took 16ms to execute
<< query #1 interest.getStats {
input: undefined,
result: Error [TRPCClientError]:
at o.from (/app/.next/server/chunks/956.js:3:94182)
at <unknown> (/app/.next/server/chunks/956.js:3:101075) {
meta: {
response: Response {
status: 200,
statusText: 'OK',
headers: Headers {
vary: 'RSC, Next-Router-State-Tree, Next-Router-Prefetch, Next-Router-Segment-Prefetch',
'content-type': 'application/json',
'transfer-encoding': 'chunked',
date: 'Fri, 08 Nov 2024 03:33:10 GMT',
connection: 'keep-alive',
'keep-alive': 'timeout=5'
},
body: ReadableStream { locked: true, state: 'readable', supportsBYOB: true },
bodyUsed: true,
ok: true,
redirected: false,
type: 'basic',
url: 'http://localhost:3000/api/trpc/interest.getStats?batch=1&input=%7B%220%22%3A%7B%22json%22%3Anull%2C%22meta%22%3A%7B%22values%22%3A%5B%22undefined%22%5D%7D%7D%7D'
}
},
shape: { message: '', code: -32603, data: [Object] },
data: {
code: 'INTERNAL_SERVER_ERROR',
httpStatus: 500,
path: 'interest.getStats',
zodError: null
}
},
elapsedMs: 55
}
⨯ Error [TRPCClientError]:
at o.from (/app/.next/server/chunks/956.js:3:94182)
at <unknown> (/app/.next/server/chunks/956.js:3:101075) {
meta: [Object],
shape: [Object],
data: [Object],
digest: '1300227502'
}
8 replies