Railway Shared Monorepo
pedroota
HOBBYOP

a year 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

a year ago

6452898b-4334-4a3f-b118-d8bfb71e8f8c


pedroota
HOBBYOP

a year 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

a year ago

6452898b-4334-4a3f-b118-d8bfb71e8f8c


a year ago

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


pedroota
HOBBYOP

a year ago


a year 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>


a year ago

Alright cool thanks for sharing


a year 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

a year ago

1389021465411719218


a year 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

a year ago

yeah exactly


pedroota
HOBBYOP

a year ago

i tried switching to Railpack, but id doesnt work too


a year ago

yea i dont think Railpack understands turborepos yet


a year ago

its still pretty new


a year ago

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


pedroota
HOBBYOP

a year ago

yeah, i did that

1389023440199090238


a year ago

ahah, that's the problem


a year ago

you don't want to do that with shared monorepos


a year ago

you do that with isolated monorepos


pedroota
HOBBYOP

a year ago

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


a year 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

a year ago

or should i just remove the root directory


a year ago

yea just remove the root directory


a year ago

then we can see what happens from there


pedroota
HOBBYOP

a year ago

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


a year ago

awesome, one step at a time


a year ago

what error did you get this time?


pedroota
HOBBYOP

a year ago


pedroota
HOBBYOP

a year ago

all the repos are showing this error right here

1389025220584538142


a year 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

a year ago

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


pedroota
HOBBYOP

a year ago

right?


a year ago

yea that should work fine actually


a year 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

a year ago

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


pedroota
HOBBYOP

a year ago

It worked!


a year ago

Awesome!!!


a year ago

Glad we got it working


Status changed to Open chandrika 12 months ago


Status changed to Solved chandrika 12 months ago


a year ago

!s


Welcome!

Sign in to your Railway account to join the conversation.

Loading...