Feanil, for confirmation, did you mean this folders | npm Docs when you mention .npm? But isn’t it confusing that in-container cache is not working as expected?
I tried mounting cache using tutor mounts add (docs), but ran into the issue of
# each service is added to a coma-separated list
tutor mounts add lms,cms,lms-worker,cms worker:/path/to/edx-platform:/openedx/edx-platform
This command line is a bit cumbersome. In addition, with this explicit form, the edx-platform repository will not be added to the build context at build time.
I instead worked around this issue by:
creating a cache directory inside my edx-platform directory
adding that directory to .gitignore
mounting edx-platform using the implicit form (tutor mounts add /path/to/edx-platform )