When using a node installer like nvm, every time you upgrade node you need to re-install your global modules.
nvm
includes nvm reinstall-packages <version>
, but this is a manual process, and if you're jumping between versions frequently, you probably don't even remember which node version has the global modules you recently discovered and installed.
nvm-global-installs
will loop through all of the installed versions of node and return an array of installed packages and versions for each version.
{
"2.3.0": {
"npm": "2.11.1",
"trash": "1.4.1"
},
"2.1.0": {
"nodemon": "1.3.7",
"npm": "2.10.1",
"npm-check": "3.2.10"
}
}
As a command line it might look like using npm ls --depth=0
for a bunch of node versions like such:
/Users/dylang/.nvm/versions/io.js/v2.3.0/lib
βββ [email protected]
βββ [email protected]
/Users/dylang/.nvm/versions/io.js/v2.1.0/lib
βββ [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
/Users/dylang/.nvm/versions/io.js/v1.0.3/lib
βββ [email protected]
βββ [email protected]
βββ [email protected]
/Users/dylang/.nvm/v0.11.14/lib
βββ [email protected]
βββ [email protected]
βββ [email protected] -> /Users/dylang/projects/pr/depcheck
βββ [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
Example highlighting
/Users/dylang/.nvm/versions/io.js/v2.3.0/lib //white, active version
βββ [email protected] //white
βββ [email protected] //white
/Users/dylang/.nvm/versions/io.js/v2.1.0/lib //gray
βββ [email protected] //yellow, not in active version
βββ [email protected] //gray
βββ [email protected] //yellow
βββ [email protected] //gray
/Users/dylang/.nvm/versions/io.js/v1.0.3/lib //gray
βββ [email protected] //gray
βββ [email protected] //yellow
βββ [email protected] //gray
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too