Skip to content

docs: use npm cache instead of node_modules for cache volumes - #8627

Merged
vikram-dagger merged 1 commit into
dagger:mainfrom
kpenfound:kyle/docs/fix-cache-volumes-node-modules
Oct 4, 2024
Merged

vikram-dagger merged 1 commit into
dagger:mainfrom
kpenfound:kyle/docs/fix-cache-volumes-node-modules

Conversation

@kpenfound

Copy link
Copy Markdown
Contributor

Mounting a cache volume at node_modules within the workdir can cause major issues for a lot of npm apps, especially if the volume is used for multiple projects or multiple sessions. Because of this, its better to mount the volume to npm's cache directory and let npm pull from the cache itself.

This best practice applies to all usage of cache volumes, however the examples we have for Go and Python already work this way.

@kpenfound
kpenfound requested review from grouville and jpadams October 4, 2024 18:48
@kpenfound
kpenfound requested review from a team as code owners October 4, 2024 18:49
@kpenfound
kpenfound requested a review from levlaz October 4, 2024 18:49
@vikram-dagger
vikram-dagger merged commit 2928b54 into dagger:main Oct 4, 2024
@kpenfound
kpenfound deleted the kyle/docs/fix-cache-volumes-node-modules branch October 7, 2024 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants