fnm
fnm copied to clipboard
pre-download of node versions
Hey,
I would like to provide Node 16/Node 18 in my docker image configurable using env. That works already great, but for this I have to preinstall both versions to make the startup faster and this takes ~260MB of storage.
An better idea would be if we could pre-download versions with their .tar.xz
file and run fnm install x
, which takes the local .tar.xz
instead of downloading it from the internet. The .tar.xz
files are ~22MB which is a huge storage saving.
this sounds like a great idea. how would u locate the files tho? i could think of
- have a
cache/
folder or something inside/.fnm
where fnm itself can store any downloaded archives and reuse them in the future when installing any of the stored versions instead of fetching - support a
--file
flag or something that directs to a file path which can be used to unzip and install. maybe there are better ways? ofc supporting local zip files can create many issues too, since the zip file may not actually be a zip for nodejs, how can that be verified?
I would assume there is a fnm download <version>
which downloads it just to the cache folder.