News for hackers. Stuff that matters.
Re:Hello Yarn 2, Goodbye node_modules by lhnz on Tuesday August 10, 2021 @05:31AM (#28126768)
There's nothing stopping you from running `npm` or `yarn` offline and committing the cache.

In fact, both of these package managers have had direct support for this workflow since 2016 (https://docs.npmjs.com/cli/v7/using-npm/config#offline) and 2017 (https://classic.yarnpkg.com/blog/2016/11/24/offline-mirror/) respectively.

Re:Hello Yarn 2, Goodbye node_modules by rlkf on Tuesday August 10, 2021 @05:03PM (#28134484)
Except that the format of the npm cache is version-specific. You would probably be better off using https://github.com/heikkipora/registry-sync instead.