How to avoid reinstall dependencies on every build
Anonymous
PROOP

a year 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?

6 Replies

Anonymous
PROOP

a year ago

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


a year ago

i think you may be interested in this template -


Anonymous
PROOP

a year 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


a year ago

are you using a Dockerfile or nixpacks?


Anonymous
PROOP

a year ago

nixpacks


a year ago

You could try writing a Dockerfile and use mount caches -


Loading...