Error: Docker build failed (by default Dockerfile, I'm not using any custom Dockerfile)

I'm deploying a simple Next.js project. And this is the error I'm facing when the project gets built.
-----
Dockerfile:25
-------------------
23 | # build phase
24 | COPY . /app/.
25 | >>> RUN --mount=type=cache,id=s/72f27e90-3cba-4b70-b242-52f65f49d0ec-next/cache,target=/app/.next/cache --mount=type=cache,id=s/72f27e90-3cba-4b70-b242-52f65f49d0ec-node_modules/cache,target=/app/node_modules/.cache yarn run build
26 |
27 |
-------------------
ERROR: failed to solve: process "/bin/bash -ol pipefail -c yarn run build" did not complete successfully: exit code: 1

Error: Docker build failed
-----
Dockerfile:25
-------------------
23 | # build phase
24 | COPY . /app/.
25 | >>> RUN --mount=type=cache,id=s/72f27e90-3cba-4b70-b242-52f65f49d0ec-next/cache,target=/app/.next/cache --mount=type=cache,id=s/72f27e90-3cba-4b70-b242-52f65f49d0ec-node_modules/cache,target=/app/node_modules/.cache yarn run build
26 |
27 |
-------------------
ERROR: failed to solve: process "/bin/bash -ol pipefail -c yarn run build" did not complete successfully: exit code: 1

Error: Docker build failed
10 Replies
Percy
Percy2y ago
Project ID: 72f27e90-3cba-4b70-b242-52f65f49d0ec,72f27e90-3cba-4b70-b242-52f65f49d0ec
Brody
Brody2y ago
please send the full build logs, that does not tell us the cause of the error, it only states that there was an error
Kunal Bagaria
Kunal BagariaOP2y ago
Understood, apologies, here you go.
Kunal Bagaria
Kunal BagariaOP2y ago
I'm unable to copy the entire logs I select everything, yet only half of it gets copied
Brody
Brody2y ago
yes you'd have to piece together the logs but 10kb of logs probably contains the error I'll look in a bit once on my computer in the mean time, can you send you repo too?
Kunal Bagaria
Kunal BagariaOP2y ago
ah, unfortunately it is not open-sourced. But it seems like it was my own error. Figured it out. Thanks for your help regardless
Brody
Brody2y ago
care to share the cause of the error?
Kunal Bagaria
Kunal BagariaOP2y ago
Type error in compilation, weirdly didn't show up locally while compiling
Brody
Brody2y ago
probably because railway sets CI = true, thus some warnings turn into errors
Kunal Bagaria
Kunal BagariaOP2y ago
ohh gotcha, that makes sense
Want results from more Discord servers?
Add your server