Railway Shared Monorepo

pedroota
HOBBY

6 days ago

I am trying to deploy a shared monorepo on Railway and the guides on how to do it provided are not very clear to me on how to do it. Can someone help?

I was using those articles right here:

https://docs.railway.com/guides/monorepo#deploying-a-shared-monorepo
https://docs.railway.com/tutorials/deploying-a-monorepo

Solved$10 Bounty

0 Replies

pedroota
HOBBY

6 days ago

6452898b-4334-4a3f-b118-d8bfb71e8f8c


pedroota
HOBBY

6 days ago

I think it's because it's using npm to install the deps instead of pnpm, but I do have a pnpm-lock.yaml in the root of the monorepo


pedroota
HOBBY

6 days ago

6452898b-4334-4a3f-b118-d8bfb71e8f8c


6 days ago

can you send your entire build logs? ctrl + k on deployment and then Download Build Logs


pedroota
HOBBY

6 days ago


6 days ago

man Railpack's thing where it tells you why it's using certain node versions or package managers would've been so useful here <:sobb:858351995865399316>


6 days ago

Alright cool thanks for sharing


6 days ago

sorry for taking so long, I'm just trying to brainstorm what could possibly cause Nixpacks to use npm if you have pnpm specified as a package manager despite you saying you don't have any nixpacks configuration files


pedroota
HOBBY

6 days ago

1389021465411719200


6 days ago

you have a lockfile too which makes it even more weird cause Nixpacks would use --frozen-lockfile for installations in that case


pedroota
HOBBY

6 days ago

yeah exactly


pedroota
HOBBY

6 days ago

i tried switching to Railpack, but id doesnt work too


6 days ago

yea i dont think Railpack understands turborepos yet


6 days ago

its still pretty new


6 days ago

just want to check something off the list real quick, are you setting a root directory in each (or any) services?


pedroota
HOBBY

6 days ago

yeah, i did that

1389023440199090200


6 days ago

ahah, that's the problem


6 days ago

you don't want to do that with shared monorepos


6 days ago

you do that with isolated monorepos


pedroota
HOBBY

6 days ago

with shared monorepos i should deploy all of the repos in only one service?


6 days ago

the way I understand it is you deploy the monorepo in seperate services for each repo under the monorepo - the only difference being each uses a different start command and therefore each runs a seperate repo


pedroota
HOBBY

6 days ago

or should i just remove the root directory


6 days ago

yea just remove the root directory


6 days ago

then we can see what happens from there


pedroota
HOBBY

6 days ago

yeah, i think we are going to the right path haha, but appeared another error


6 days ago

awesome, one step at a time


6 days ago

what error did you get this time?


pedroota
HOBBY

6 days ago


pedroota
HOBBY

6 days ago

all the repos are showing this error right here

1389025220584538000


6 days ago

<:Thinking:1360710341239242762> nixpacks is using pnpm 9, but you have pnpm 8.15.6 specified in your package.json
this is likely causing a version mismatch leading to the lockfile being ignored leading to nixpacks not finding your lockfile leading to the error


pedroota
HOBBY

6 days ago

cool, i could possibly just update my pnpm to v9 then


pedroota
HOBBY

6 days ago

right?


6 days ago

yea that should work fine actually


6 days ago

still begs the question as to why its not respecting your specified pnpm version but i guess if you need a quick fix then that works


pedroota
HOBBY

6 days ago

yeah, it should work, but no prob, just updated to v9, lets see if it works


pedroota
HOBBY

6 days ago

It worked!


6 days ago

Awesome!!!


6 days ago

Glad we got it working


Status changed to Open chandrika 6 days ago


Status changed to Solved chandrika 6 days ago


3 days ago

!s


Railway Shared Monorepo - Railway Help Station