How to avoid reinstall dependencies on every build
Anonymous
PROOP

2 years ago

I have a monorepo project using Turborepo with many React and React Native packages and apps. Every time I deploy something, it reinstalls all the project dependencies, which makes the build process extremely long.

Is there any way to avoid this? I see that nixpacks automatically cache directories during install and build phases but maybe I have to do something else to make it work properly in a monorepo?

Closed

6 Replies

Anonymous
PROOP

2 years ago

e60124ce-5bb4-41cb-8517-9606dbe5b9f7


2 years ago

i think you may be interested in this template -


Anonymous
PROOP

2 years ago

My problem is not with the build time itself but with the fact that my node modules is not being cached and everything is fully reinstalled on every deploy


2 years ago

are you using a Dockerfile or nixpacks?


Anonymous
PROOP

2 years ago

nixpacks


2 years ago

You could try writing a Dockerfile and use mount caches -


Welcome!

Sign in to your Railway account to join the conversation.

Loading...