Monorepo sub directory deployment failing
Hello.
I wish to deploy a sub directory of my mono repo.
The sub dir that i wish to deploy is
/apps/points-server
This is how my variables are set
Root Directory
/apps/points-server
Build Command
Build Command
Watch Paths
/apps/points-server
Start command
pnpm run start
This is the logs i get after trying to deploy:
This is the package.json of the sub dir
19 Replies
Project ID:
dda6e822-b6a7-446d-9689-244823126a93,dda6e822-b6a7-446d-9689-244823126a93,dda6e822-b6a7-446d-9689-244823126a93
Unsupported URL Type "workspace:": workspace:0.0.0is
workspace:0.0.0
supposed to be a supported URL type?I have no clue. It works just fine in development environment
I think it might be using npm for the npm install command
Can i force it to use pnpm?
pnpm is used if a
pnpm-lock.yaml
file is detected
can you show me the table at the top of the build logs?can you share a link to your repo?
Unfortunately i cannot 😦
Im employed for the project, and it is not opensource atm
do you have a pnpm-lock.yaml file in that sub directory?
the pnpm-lock.yaml is located in the directory above the sub directory
maybe that is whats causing it
it is
then instead of defining the root dir, i should maybe change the "start" command to cd into the sub dir, and then run it
you have also mistakenly tried to overwrite the build and start commands in the service settings
no this would be a hack, place the lock file into the correct directory
hmmmm. is it bad practice to share lock file across all sub directories in a mono repo?
in my experience the difference services inside a mono repo (where both are node apps) would have their own package and package lock files
okayi
GitHub
GitHub - t3-oss/create-t3-turbo: Clean and simple starter repo usin...
Clean and simple starter repo using the T3 Stack along with Expo React Native - GitHub - t3-oss/create-t3-turbo: Clean and simple starter repo using the T3 Stack along with Expo React Native
i used this as the template for the repo
and they just use one main lock file
i guess i gotta figure out how to change it so there is only one then
mono repos are hard 😛
yes but railway relies on the presence of a pnpm lock file to know the app uses pnpm
I think it would make more sense for railway to add the option to specify your own install command
Having multiple lock files eliminates some of the benefits from having mono repo
Install command just need to cd into the correct dir, and it will work