App developers: please consider using
pnpm. YNH core developers, please consider recommending or non-strictly enforcing using of
pnpm, in place of
npm, in app packaging.
I want to suggest app developers consider, and favor, using
I share this because I’m inspecting causes of disk space filling, and
node_modules often come up as heavy hitters in disk space usage, and disk space usage and mitigation strategies often require coordination beyond the level of individual app packaging.
I had issues with running out of disk space on my server, shared with friends, hosting yunohost. I happened to resolve my disk space issues with a
journalctl --rotate and
journalctl --vacuum-time=2w, and have other strategies I want to push on.
Particularly inclusion of
cypress, which should be in dev (and not production)
package.json dependencies of projects, and so should probably not get installed by ynh-packaged apps. Cypress, a web testing framework (presumably used by upstream projects for end-to-end integration tests) is using 606MB/1.9GB + 643MB/1.5GB in my most disk-hungry applications of Uptime-Kuma and Monica, respectively. It’s installed and consuming disk space, despite that it should probably never run while installed on my machine.
Uptime-Kuma is using another 510MB for
node_modules—see again, where
pnpm can help—582MB in my status timeseries data, and 200MB in an opaque SHA512-keyed
It seems like Yarn, with PnP (Plug 'n Play) strategy, addresses this as well, with a shared global cache, however with
enableGlobalCache set to default false, it make a copy for each project. It seems like yarn does not by itself, by default, nor in most configurations, solve this issue too as pnpm does.