Simple next.js build fail

deployment ID 6b59c99d-f9d1-42bb-9733-67e02909cdc5
Repo: https://github.com/ballermatic/nextjs-shadcn
#12 0.524 runc run failed: unable to start container process: error during container init: error mounting "/var/lib/docker/overlay2/e5otij3fmo9s1ewupul8502po/diff" to rootfs at "/app/tsconfig.tsbuildinfo": mount /var/lib/docker/overlay2/e5otij3fmo9s1ewupul8502po/diff:/app/tsconfig.tsbuildinfo (via /proc/self/fd/6), flags: 0x5000: not a directory

#12 ERROR: process "/bin/bash -ol pipefail -c yarn run build" did not complete successfully: exit code: 1

I'm stumped. This is using nixpacks, builds fine locally. Any ideas?
please send full build logs
this doesn't look like a user issue, will flag team
Thread has been flagged to Railway team by @Brody.
Whew! I assumed it was user error…
thats a good assumption, but nah
would you happen to have the deployment id for that failed deployment?
if you open the deployment you will see a ?id= query string param in the url, that would be the deployment id
in the mean time, dont touch that service if possible, if you create a new service in the same project, it shouldnt have this problem
Ok, will do!
Hmmm, deployment failed however no error in build logs. They just stop.
#10 0.711 yarn install v1.22.19

#10 0.816 [1/4] Resolving packages...

#10 1.093 [2/4] Fetching packages...

#10 25.92 [3/4] Linking dependencies...

#10 30.29 [4/4] Building fresh packages...
@project: 8c545066-0015-4ef3-9a41-591f9f242a2d
@environment: 261e9b2a-29ea-4b26-a38c-b30a818ca8bc
@service: 9af16dbf-1a02-417f-baee-b2a3694f6e04
@snapshot: c9ead65c-3b52-405b-b50a-1b95529df0c4
try again lol
once back at my computer I'll be trying to deploy your repo too
got it to build with the variable NIXPACKS_NO_CACHE = 1
however, it produced a 2gb image
Whoa. Why so huge? This is worse than the other one.
haha i know, and that was a 2gb image made by nixpacks, its not even my fault this time lol
Well if it works it works!
im working on a multistage nixpacks build, i wonder if i will succeed
Thanks again!
The payload crew asked about a multi stage docker file
My knowledge envelope tapers quickly with DevOps.
yeah im trying to do the same, but with nixpacks
got the image down to ~480mb with this nixpacks.toml file
    NPM_CONFIG_FUND = 'false'

    dependsOn = ['build']
    cmds = ['npm prune --production']

    runImage = 'node:18.17.1-slim'
    onlyIncludeFiles = ['./package.json', './next.config.mjs', './public', './.next', './node_modules']
    cmd = 'npm run start'

those two npm variables dont do anything for the size, they just disable annoyances
still need NIXPACKS_NO_CACHE = 1 for some reason though
Do I add that to the repo?
Right on
Thank you again!
no problem!
the build has worked? and image is small again?
No cache worked, pushing with .toml now
ah okay
Boom, 496Mb now, nicely done
Builds and deploys much faster too
you can tweak the onlyIncludeFiles incase i missed something
The first issue seems to be due to a bad docker state on one of the builders. I've cycled it so you should be good to remove the NIXPACKS_NO_CACHE variable if you would like

Looking for more? Join the community!

Recommended Posts
Database credentialsHello, my Railway starter plan has expired and I want to make a copy of my postgres database but iRunning python script [userbot]Hello so I have this python script that is used to automate something with email account can i use I need help on deploying my development database to production without losing any dataI mistakenly ran the command `npx prisma migrate dev` on my production env but did not accept when tNpgsql.npgsqlException (0x80004005) Failed to connect to! im trying to connect to an ASP.Net core 6 to railway.app for the first time and i receive the inDeploying for the first timeHi, I am new to railroad and I am trying to deploy my flask app. I am getting this error: ``` DockI can't seem to be able to use the mariadb app i'm running in my PHP projectI want to be able to connect my mariadb app deployed on railway in my PHP script but when I try to uRailway too slowI have an issue with my railwat app. The app is too slow once update my github project. Making it alTrying to communicate over private network and not workingI have a service that has just private networking enabled and listens on ipv6 (http server). When I How is Redis instance pricing calculatedDoes the per vCPU and per GB memory pricing apply to a Redis database? Would like to know before I svolume permissionsMy docker run script is trying to install as a user owned file into volume mount point but getting pDeployment Issue: ModuleNotFoundError for Flask with Poetry-based ProjectHello, I'm having trouble deploying a Flask app on Railway using Poetry for dependency management. DDoes HTTP response count towards egress quota?I just want to check an external endpoint a few times a day but the response is quite big.Hosting a Directus + NuxtJs project service availableI'm trying to host a Directus service and NuxtJs service but I'm having some trouble getting the froDB StorageHello all, I have a question. How much storage does Railway have when building a server or databaseLogs broken?Hello is there a problem with logs? I am not seeing any build or deploy logs at all, I just see the Minecraft Server isn't working?When I use the minecraft server template and leave everything it will give this error in the logs anFormbricks Template error (upon redeployment w/ SMTP setup)``` error getting environment TypeError: fetch failed at Object.fetch (node:internal/deps/undicPayload CMS + Nextjs Deployment Failed during build processUsing the template courtesy of @Brody with Next.js added [as seen here](https://github.com/payloadcmHosting a modded Minecraft serverHi guys! I'm trying to host a modded minecraft server through Railway using the `Minecraft Server` tCan't connect to RedisThis is the error I am getting. What I have checked so far * Made sure I used the env variables prov