System maintenance: nvm notes
nvm can be used to manage Node.js versions and switch between them quickly. I don't use it much day to day, but I had a rough memory of it, so I searched and found I'd written about it in August 2024. Back then it was to solve the problem of "npm install -g always lacking permission" — I installed nvm, expecting to use it to manage nodejs and maintain directory permissions. But I didn't end up using it to manage nodejs; instead I managed directory permissions manually, adding the path `~/.npm-global` to npm config so that `npm install -g` installed packages to a different path, which solved the permission problem. `hexo` and `yarn` were involved too, and after the change they were both installed under the `~/.npm-global` directory.



