trouble working with npm workspaces
Hey I'm working in a new pattern than usual which is a monorepo using npm workspaces
My build failed after i introduced a shared package and it says
error TS2307: Cannot find module '@local/keylib' or its corresponding type declarations.
I am using the root directory config in railway. Does that throw out the code outside from workspace? This could be why it can't reference code from other workspaces. Any help?8 Replies
Project ID:
cd11aa3e-055b-41a8-ba34-f9827ba92cfb
cd11aa3e-055b-41a8-ba34-f9827ba92cfb
you are absolutely correct, only the set directory is copied, for packages that share code or types you wouldn't want to set a root directory
I see, i'll try adding custom config in my dockerfiles
Would watch path be affected in any way? I don't want useless unchanged deploys
they shouldn't
Aight I didn't think this through. Is this still possible
I want to use the keyclient as my shared library
core-service
and keymanager-service
are seperate railway services
Will railway be able to support a monorepo structure like this or should i break it upyeah seems fine to me, keep the root directory as the root and set the location to the dockerfiles via the service variable
https://docs.railway.app/reference/variables#user-provided-configuration-variables
Thanks!