Current state
System productized build is caching npm binaries.
Right now the node_modules of system is saved in the cache.tar.gz.
Issues
- If the base image updates the version of a library, then the compiled node modules might eventually break, referencing an outdated version of this library
- CVE rebuild might fail on compiling assets
- This is critical for productization and CVEs, etc.
How to fix it
Cache the node packages in the cache.tar.gz like we do for ruby gems.
We need to make sure that node_modules is containing the sources.
Then what we can do is remove the binaries from the cache and cache node_modules directory.