Railpack cannot resolve monorepo dependencies with hoisted linking
mhornbacher
PROOP

2 months ago

I am trying to push a update to my application which built fine yesterday. the update consists purely of a npm package bump for all services on railway. However as of today it is no longer able to resolve monorepo packages in Railpack... No configuration has changed in Railway.

Closed

12 Replies

mhornbacher
PROOP

2 months ago

Hm, it seems to be tied to nodeLinker: hoisted which was enabled to fix issues in the mobile app


mhornbacher
PROOP

2 months ago

Railpack cannot resolve monorepo dependencies with hoisted linking


mhornbacher
PROOP

2 months ago

Yeah, seems railpack is an unmaintained or documented mess. Time to leave railway... every single deployment I have done so far has caused hours of debugging pain 😢


iloveitaly
HOBBY

2 months ago

@mhornbacher do you have the build log or any other information about the failure?


mhornbacher
PROOP

2 months ago

Sure, I attached the full log here, it was fixed by setting RAILPACK_INSTALL_CMD to pnpm install --frozen-lockfile --prefer-offline --config.node-linker=isolated (changing the linker fixed it)

Attachments


mhornbacher
PROOP

2 months ago

Oh this is fun, suddenly all builds are returning this symlink error

> Build Failed: build daemon returned an error < failed to solve: cannot replace to directory /var/lib/buildkit/runc-overlayfs/cachemounts/buildkit3410151940/app/apps/mobile/node_modules/@types/node with file >

Looks like something new changed that breaks monorepos with isolated dependencies, specifically in the build pipeline


mhornbacher
PROOP

2 months ago

It really hurts but I got to say, I have not had a single commit deploy without issue yet... and its not a complicated project yet in any way


iloveitaly
HOBBY

2 months ago

@mhornbacher oh man I am so sorry! Hurts to hear it but I'd love to handle this use case.

We don't have any tests for NX right now, so I bet that's part of the issue. Does this look like the tooling you are using:

  • NX (monorepo)
  • Next.js 16.2.9 + Turbopack
  • TypeScript/MDX
  • next-intl + Fumadocs (i18n)

I'll use this to generate a example project, so I'd like to make sure I have the full list of tooling you are using.

The log you posted doesn't look like the whole railpack build log. It should list out the versions (pnpm, node, etc) and give some other detail about the plan. Can you see that in your railway build logs?


mhornbacher
PROOP

2 months ago

It is. With a bit more.

I keep all the code open because closed source is in my opinion a big pain for little to no real gain. Especially in the “age of cheap AI”

Feel free to poke around. If you need the upstream keys for fontawesome/heroui lmk and ill DM you 1 password links 🙂

https://github.com/dog-dating-app/platform


mhornbacher
PROOP

2 months ago

I resolved the issue by moving fully to Docker builds and copying the Caddyfile from Railways spa pack. Seems to work well if a bit slower to build 🙂


iloveitaly
HOBBY

2 months ago

Oh, this is great! I didn't realize what you were working on was open source


mhornbacher
PROOP

2 months ago

Yes, I think security by obscurity is a bad idea lol. And having your code hidden is both not valuable and a giant pain in the 🍑 🤣


Welcome!

Sign in to your Railway account to join the conversation.

Loading...