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
39 Replies
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
9 months ago
can you send your entire build logs? ctrl + k on deployment and then Download Build Logs
sure!
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
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
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?
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
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
9 months ago
yea just remove the root directory
9 months ago
then we can see what happens from there
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?
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
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
yeah, it should work, but no prob, just updated to v9, lets see if it works
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


