After completing the development of a Next.js application (discord clone), I encountered an issue while trying to deploy it on Railway. The error message was:
Dockerfile:20
-------------------
18 | ENV NIXPACKS_PATH /app/node_modules/.bin:$NIXPACKS_PATH
19 | COPY . /app/.
20 | >>> RUN --mount=type=cache,id=s/f030b20a-f891-45f4-a90b-e68a001e0ab2-/root/npm,target=/root/.npm npm ci
21 |
22 | # build phase
-------------------
ERROR: failed to solve: process "/bin/bash -ol pipefail -c npm ci" did not complete successfully: exit code: 1
Error: Docker build failed
I attempted various solutions without success, so I decided to deploy it on Oar instead, where it worked. However, the developer console displayed this warning:
Failed to load resource: the server responded with a status of 504 ()
84-43d7e0f08e9f6991.js:6
WebSocket connection to 'wss://next-js-aeternitas.vercel.app/api/socket/io?EIO=4&transport=websocket&sid=G3Y8vg55sZi4_TIKAAAA' failed: