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
0 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
6 days ago
can you send your entire build logs? ctrl + k
on deployment and then Download Build Logs
sure!
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
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
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?
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
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
6 days ago
yea just remove the root directory
6 days ago
then we can see what happens from there
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?
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
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
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