Build Cache + File dependency + Monorepo not working

I have a monorepo that just uses NPM file://…/path/to/localpackage/dist to manage dependencies. The dist folders are not committed to the repo, and are rebuilt as part of the CI process. Even so, it seems the build cache can’t handle this, and so builds do not reflect changes in dependencies. I have to Clear Build Cache manually for changes to reflect.

This is kinda annoying: It would be nice to surface some details and configurations for the cache. Caches are nice for speed, but not so nice when you can’t control them, see their state, or get a deterministic transformation from git repo → final artifact.

Hi there,

This should work without needing to clear your build cache. Installing local modules like this just creates a symlink from the node_modules directory to the location within your code where the local module exists. When caching your build the node_modules folder is cached, including the symlink, and when it is restored it should still point to the location of your local module and see the changes made to it.

It would be helpful if we could see your live service on Render to get an understanding of why this doesn’t work for you. Can you please open a ticket with a from our dashboard so we have the ability to see your services.

Regards,

Keith
Render Support, UTC+10 :australia:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.