Tangible Bytes

A Web Developer’s Blog

Nvm Default Packages

This is one of those things I wont need again for a while and will forget.

When using nvm to get a new version of nodejs you can find you no longer have packages - including yarn

https://github.com/nvm-sh/nvm#default-global-packages-from-file-while-installing

If you have a list of default packages you want installed every time you install a new version, just add the package names, one per line, to the file $NVM_DIR/default-packages. You can add anything npm would accept as a package argument on the command line.