Railway Shared Monorepo
pedroota
HOBBYOP

9 months 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

39 Replies

pedroota
HOBBYOP

9 months ago

6452898b-4334-4a3f-b118-d8bfb71e8f8c


pedroota
HOBBYOP

9 months 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
HOBBYOP

9 months ago

6452898b-4334-4a3f-b118-d8bfb71e8f8c


9 months ago

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


pedroota
HOBBYOP

9 months ago


9 months 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>


9 months ago

Alright cool thanks for sharing


9 months 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
HOBBYOP

9 months ago

1389021465411719200


9 months ago

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


pedroota
HOBBYOP

9 months ago

yeah exactly


pedroota
HOBBYOP

9 months ago

i tried switching to Railpack, but id doesnt work too


9 months ago

yea i dont think Railpack understands turborepos yet


9 months ago

its still pretty new


9 months ago

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


pedroota
HOBBYOP

9 months ago

yeah, i did that

1389023440199090200


9 months ago

ahah, that's the problem


9 months ago

you don't want to do that with shared monorepos


9 months ago

you do that with isolated monorepos


pedroota
HOBBYOP

9 months ago

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


9 months 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
HOBBYOP

9 months ago

or should i just remove the root directory


9 months ago

yea just remove the root directory


9 months ago

then we can see what happens from there


pedroota
HOBBYOP

9 months ago

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


9 months ago

awesome, one step at a time


9 months ago

what error did you get this time?


pedroota
HOBBYOP

9 months ago


pedroota
HOBBYOP

9 months ago

all the repos are showing this error right here

1389025220584538000


9 months 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
HOBBYOP

9 months ago

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


pedroota
HOBBYOP

9 months ago

right?


9 months ago

yea that should work fine actually


9 months 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
HOBBYOP

9 months ago

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


pedroota
HOBBYOP

9 months ago

It worked!


9 months ago

Awesome!!!


9 months ago

Glad we got it working


Status changed to Open chandrika 9 months ago


Status changed to Solved chandrika 9 months ago


8 months ago

!s


Loading...