#Nextjs build fail - runc run failed: unable to start container process

42 messages · Page 1 of 1 (latest)

abstract tendon
#

Deployment ID dd25dd4a-51bd-489e-94a0-387b5ef51852 and github repo using Nixpacks with nixpacks.toml courtesy of @bleak dock on an earlier iteration. Note, build randomly worked once out of dozens of attempts today. Error logs attached. Two key errors appear to be:

#14 0.442 runc run failed: unable to start container process: error during container init: error mounting "/var/lib/docker/overlay2/ylv4o55u3eenxetp8t9mxexop/diff" to rootfs at "/app/tsconfig.tsbuildinfo": mount /var/lib/docker/overlay2/ylv4o55u3eenxetp8t9mxexop/diff:/app/tsconfig.tsbuildinfo (via /proc/self/fd/6), flags: 0x5000: not a directory

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

As well as

> [stage-0 8/11] RUN --mount=type=cache,id=s/a4202936-edb2-4b30-8f88-d5d5dd20d757-next/cache,target=/app/.next/cache --mount=type=cache,id=s/a4202936-edb2-4b30-8f88-d5d5dd20d757-node_modules/cache,target=/app/node_modules/.cache --mount=type=cache,id=s/a4202936-edb2-4b30-8f88-d5d5dd20d757-tsconfigtsbuildinfo,target=/app/tsconfig.tsbuildinfo npm run build:

0.442 runc run failed: unable to start container process: error during container init: error mounting "/var/lib/docker/overlay2/ylv4o55u3eenxetp8t9mxexop/diff" to rootfs at "/app/tsconfig.tsbuildinfo": mount /var/lib/docker/overlay2/ylv4o55u3eenxetp8t9mxexop/diff:/app/tsconfig.tsbuildinfo (via /proc/self/fd/6), flags: 0x5000: not a directory

I am way out of my depth on this one.

GitHub

Contribute to ballermatic/nextjs-shadcn development by creating an account on GitHub.

iron questBOT
#

Project ID: dd25dd4a-51bd-489e-94a0-387b5ef51852,a4202936-edb2-4b30-8f88-d5d5dd20d757,a4202936-edb2-4b30-8f88-d5d5dd20d757,a4202936-edb2-4b30-8f88-d5d5dd20d757

wispy sphinxBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

abstract tendon
#

Also note, NIXPACKS_NO_CACHE = 1 does not seem to help with this error.

bleak dock
#

scary looking error, think this one is out of our control

#

tagging in @agile glacier for this

abstract tendon
#

I wondered if that was the case. Earlier failures were definitely my doing until this one began to persist. I switched to npm due to yarn berry issues, then started re-adding the service fresh.

bleak dock
#

@native adder - while your at it, this thread needs some attention too 🙂

#

don't know if it's running on the same host that just experienced this issue or not

native adder
#

Unrelated. JR's the expert 😉 He's currently out & will be back tomorrow

bleak dock
#

ah gotcha!

austere elm
#

Just putting a message in here so if a response is made I'll be notified as experiencing the same issue.

abstract tendon
#

Adding a little wrinkle… although this project remains dead due to the build error, I created a new one which replicates it almost verbatim and that one works. 4e14523a-53bd-46f8-85c7-9d34ed06fb93

#

My solution was to use @inner cape's functioning template nextjs-approuter-shadcn
and then migrate my customizations over. That worked perfectly. As always, I appreciate everyone's help learning Railway! Thank you so much!!!

GitHub

Railway Template - NextJS using AppRouter with Shadcn UI Elements - GitHub - codyde/nextjs-approuter-shadcn: Railway Template - NextJS using AppRouter with Shadcn UI Elements

bleak dock
#

so the nixpacks.toml i did was causing issues?

agile glacier
#

Just having a look at this now. Is there a project/repo that currently fails to deploy?

agile glacier
abstract tendon
#

Whups, spoke too soon… rolling back now. I found something.

abstract tendon
abstract tendon
#

It may have been typescript version. 5.1.6 works, 5.2.2 does not. Unclear about the tsbuildinfo cache.

bleak dock
#

oh wow downgrading the ts version solved the issue? thats interesting

abstract tendon
#

There may have been a bad component also, still checking on that

#

Wouldn't expect that to be the case as it builds fine locally, no errors, etc. Will know more soon.

abstract tendon
#

It seems 'use client' is not working for the nav component. That may have been the culprit. Tried other versions or next and node, no luck.

abstract tendon
#

Yup. Closing this out due to app router learning on my end. If anyone finds this thread, I will post the solution when I find it. Thank you for helping me but this problem seems to be Next.js, not Railway.

#

For reference: tested node v 18.x-20.x (especially 18 --lts) and Next 13.4.9-13.4.19. It's the app router and my lack of understanding. I cannot convey how important @bleak dock is with this process. Holy shit.

#

Thank you.

bleak dock
#

awh shucks, thanks

abstract tendon
#

Nesting 'get client' into a component didn't do it. I'm still processing the documentation for a millionth time and debating moving back to page router.

#

If you're not already in touch, the payload CMS crew are stone cold badass, in the best way.

bleak dock
#

hey I did the template for payload

inner cape
abstract tendon
#

Finally have a working solution. Sure enough, it was a client/server error!

#

Methodically went through the ringer and finally sorted it out. Context and hooks are a bear with RSC.

#

Oops, need to push yet, just a moment.

abstract tendon
#

Rudimentary but a nice basis for more.

bleak dock
#

the nav doesn't work 😦

abstract tendon
#

It's set to home, only one page

bleak dock
#

that's no fun 🤣

abstract tendon
#

Should probably add those routes so its obvious lol