R
Railwayβ€’14mo ago
3arcus

Trying to deploy Next js 13 app and its failing?

Hey guys, whats the process to deploy a simple Next js app? Version 13. Right now its failing. Is there specific steps? I'm just trying to deploy it from the github repo.
25 Replies
Percy
Percyβ€’14mo ago
Project ID: c8ae4fa9-ea5e-4a2a-b926-127053262298
3arcus
3arcusβ€’14mo ago
c8ae4fa9-ea5e-4a2a-b926-127053262298 "ERROR: failed to solve: process "/bin/bash -ol pipefail -c yarn run build" did not complete successfully: exit code: 1 Error: Docker build failed"
Brody
Brodyβ€’14mo ago
can you please provide full build logs?
3arcus
3arcusβ€’14mo ago
Im working trough it rn I think tis because Im uploading pages that I was just using to keep some code dev, is there a way to signal railway to ignore stuff? like an ignore file?
3arcus
3arcusβ€’14mo ago
hmmm, ok, I wanted to save those pages on my repo, just not on the production, I guess I need two different repos? also, how do I solve this error: Dockerfile:25 ------------------- 23 | # build phase 24 | COPY . /app/. 25 | >>> RUN --mount=type=cache,id=s/6938deab-95c5-4dea-a72a-638ab065b303-next/cache,target=/app/.next/cache --mount=type=cache,id=s/6938deab-95c5-4dea-a72a-638ab065b303-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
Brody
Brodyβ€’14mo ago
that does not tell me what the error is, it only states that there was an error. please provide full build logs
3arcus
3arcusβ€’14mo ago
ok I was able to publish Im unable to expose the server says not found
Brody
Brodyβ€’14mo ago
works now
3arcus
3arcusβ€’14mo ago
AWESOME thanks!
Brody
Brodyβ€’14mo ago
little tip, setup a health check endpoint so that railway knows when your app has started and can switch over to new deploys with zero downtime https://docs.railway.app/deploy/healthchecks
3arcus
3arcusβ€’14mo ago
ok, let me learn about this, thank you Brody!
Brody
Brodyβ€’14mo ago
no problem! cool website design btw!
3arcus
3arcusβ€’14mo ago
thanks! πŸ˜› I did it haha Im having some problems I can see the site just fine but my team does not, seems its not fetching the NFT metadata nor the thirdweb stuff I cant replicate the error on my end which is super weird
Brody
Brodyβ€’14mo ago
are you on the teams plan?
3arcus
3arcusβ€’14mo ago
no but so far only one person has this problem, he is in America, my other 2 team mates see the website like I do, they are in Europe and South America
Brody
Brodyβ€’14mo ago
can i have specific error messages/screenshots? that is far to vague for me to help you with
Mooshux
Mooshuxβ€’14mo ago
I am getting this same error as well well similar error
Brody
Brodyβ€’14mo ago
they just had to wait a bit and it was fine
Mooshux
Mooshuxβ€’14mo ago
I am getting this: error Your lockfile needs to be updated, but yarn was run with --frozen-lockfile. so looking into that
Brody
Brodyβ€’14mo ago
run just yarn
Mooshux
Mooshuxβ€’14mo ago
not quite sure what you are wanting me to do. But I am rerunning yarn install and checking in a new yarn.lock and seeing if that fixes things
Brody
Brodyβ€’14mo ago
thats exactly what i want you to do πŸ™‚
Mooshux
Mooshuxβ€’14mo ago
werdz πŸ‘ thanks that seems to have done it apparently the railway docker file has yarn install with that --frozen-lockfile param in it. I guess that makes sense
Brody
Brodyβ€’14mo ago
yep, it produces a slightly faster build since that command will just install the deps without spending the time to unnecessarily regenerate the lock file