Undici fetch failed while building solid-start project on prod server
@Halcyon
while building solid-start project with
solid-start build
inside docker build with node:20-alpine3.18
this error seems to intermittently and consistently appear.
usually it will work after i restart the build process. but this is still annoying and a major source of anxiety.
err: #17 287.0 node:internal/deps/undici/undici:12344
err: #17 287.0 Error.captureStackTrace(err, this);
err: #17 287.0 ^
err: #17 287.0
err: #17 287.0 TypeError: fetch failed
err: #17 287.0 at node:internal/deps/undici/undici:12344:11
err: #17 287.0 at async Module.createHTML (file:///web/node_modules/.pnpm/solid-start@0.3.6_@solidjs+meta@0.28.6_@solidjs+router@0.8.3_solid-js@1.7.12_solid-start-node@0.3.6_vite@4.4.11/node_modules/solid-start/dev/create-index-html.js:9:17)
err: #17 287.0 at async Object.spaClient (/web/node_modules/.pnpm/solid-start@0.3.6_@solidjs+meta@0.28.6_@solidjs+router@0.8.3_solid-js@1.7.12_solid-start-node@0.3.6_vite@4.4.11/node_modules/solid-start/bin.cjs:408:13)
err: #17 287.0 at async Object.build (file:///web/node_modules/.pnpm/solid-start-node@0.3.6_solid-start@0.3.6_vite@4.4.11/node_modules/solid-start-node/index.js:23:9) {
err: #17 287.0 cause: SocketError: other side closed
err: #17 287.0 at Socket.onSocketEnd (node:internal/deps/undici/undici:8903:26)
err: #17 287.0 at Socket.emit (node:events:530:35)
err: #17 287.0 at endReadableNT (node:internal/streams/readable:1696:12)
err: #17 287.0 at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
err: #17 287.0 code: 'UND_ERR_SOCKET',
err: #17 287.0 socket: {
err: #17 287.0 localAddress: '127.0.0.1',
err: #17 287.0 localPort: 48214,
err: #17 287.0 remoteAddress: '127.0.0.1',
err: #17 287.0 remotePort: 45569,
err: #17 287.0 remoteFamily: 'IPv4',
err: #17 287.0 timeout: undefined,
err: #17 287.0 bytesWritten: 170,
err: #17 287.0 bytesRead: 0
err: #17 287.0 }
err: #17 287.0 }
err: #17 287.0 }
err: #17 287.0
err: #17 287.0 Node.js v20.11.0
err: #17 287.6 ELIFECYCLE Command failed with exit code 1.
err: #17 ERROR: process "/bin/sh -c pnpm run build" did not complete successfully: exit code: 1
err: ------
err: > [builder 9/10] RUN pnpm run build:
err: 287.0 remoteFamily: 'IPv4',
err: 287.0 timeout: undefined,
err: 287.0 bytesWritten: 170,
err: 287.0 bytesRead: 0
err: 287.0 }
err: 287.0 }
err: 287.0 }
err: 287.0
err: 287.0 Node.js v20.11.0
err: 287.6 ELIFECYCLE Command failed with exit code 1.
err: #17 287.0 node:internal/deps/undici/undici:12344
err: #17 287.0 Error.captureStackTrace(err, this);
err: #17 287.0 ^
err: #17 287.0
err: #17 287.0 TypeError: fetch failed
err: #17 287.0 at node:internal/deps/undici/undici:12344:11
err: #17 287.0 at async Module.createHTML (file:///web/node_modules/.pnpm/solid-start@0.3.6_@solidjs+meta@0.28.6_@solidjs+router@0.8.3_solid-js@1.7.12_solid-start-node@0.3.6_vite@4.4.11/node_modules/solid-start/dev/create-index-html.js:9:17)
err: #17 287.0 at async Object.spaClient (/web/node_modules/.pnpm/solid-start@0.3.6_@solidjs+meta@0.28.6_@solidjs+router@0.8.3_solid-js@1.7.12_solid-start-node@0.3.6_vite@4.4.11/node_modules/solid-start/bin.cjs:408:13)
err: #17 287.0 at async Object.build (file:///web/node_modules/.pnpm/solid-start-node@0.3.6_solid-start@0.3.6_vite@4.4.11/node_modules/solid-start-node/index.js:23:9) {
err: #17 287.0 cause: SocketError: other side closed
err: #17 287.0 at Socket.onSocketEnd (node:internal/deps/undici/undici:8903:26)
err: #17 287.0 at Socket.emit (node:events:530:35)
err: #17 287.0 at endReadableNT (node:internal/streams/readable:1696:12)
err: #17 287.0 at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
err: #17 287.0 code: 'UND_ERR_SOCKET',
err: #17 287.0 socket: {
err: #17 287.0 localAddress: '127.0.0.1',
err: #17 287.0 localPort: 48214,
err: #17 287.0 remoteAddress: '127.0.0.1',
err: #17 287.0 remotePort: 45569,
err: #17 287.0 remoteFamily: 'IPv4',
err: #17 287.0 timeout: undefined,
err: #17 287.0 bytesWritten: 170,
err: #17 287.0 bytesRead: 0
err: #17 287.0 }
err: #17 287.0 }
err: #17 287.0 }
err: #17 287.0
err: #17 287.0 Node.js v20.11.0
err: #17 287.6 ELIFECYCLE Command failed with exit code 1.
err: #17 ERROR: process "/bin/sh -c pnpm run build" did not complete successfully: exit code: 1
err: ------
err: > [builder 9/10] RUN pnpm run build:
err: 287.0 remoteFamily: 'IPv4',
err: 287.0 timeout: undefined,
err: 287.0 bytesWritten: 170,
err: 287.0 bytesRead: 0
err: 287.0 }
err: 287.0 }
err: 287.0 }
err: 287.0
err: 287.0 Node.js v20.11.0
err: 287.6 ELIFECYCLE Command failed with exit code 1.
0 Replies