Deploying nextjs 14 using Dockerfile crashes when "yarn build"
I have a nextjs14 app, and i'm deploying it using Dockerfile, i've dome multiple steps, i added the "standalone" option in next.config.js, i've installed sharp (since is required for image optimization), and i added Dockerfile from the docs (and changed some things for improvement). After all of this, i ran the docker build succesfully in my machine, and i was ready to deploy it to railway, but crashed with following error
16 | >>> RUN yarn build
β ERROR: failed to solve: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1
how to solve π₯²
project id π 668ffc82-69a0-4dfa-8d2d-3fa3fd2d127c
10 Replies
Project ID:
668ffc82-69a0-4dfa-8d2d-3fa3fd2d127c
please provide your build logs https://bookmarklets.up.railway.app/log-downloader/
mmm, not sure how to do that, give me a second please !
I think this is what you asked for
im seeing a bunch of
Can't resolve
errors, make sure the casing of your file names is the same on github as you have locallyAlright, i thought that wasn't a big deal, but i'll check that out, and try again
thanks!
yeah github doesn't seem to track the file casing, but I don't know enough about github to comment on why that happens or how to prevent it, all I know is that is what has caused very similar errors before
Damn, that was the problem, in github i had a file called "Home" and locally it was "home"
thank you so much, i finished my deployment
haha yep that would do it