thanks icon indicating copy to clipboard operation
thanks copied to clipboard

Listing globally installed packages

Open elmigranto opened this issue 8 years ago • 0 comments

I have some ~/bin scripts with node shebang and was wondering how to list those --global packages I use.

npm list --global vs thanks --global


I have node installed via nvm, so I tried manually going to node_modules directory. Unfortunately, it does not seem like npm maintains package.json for --globally installed packages and thanks hangs forever in case that file is missing:

$ cd .nvm/versions/node/v8.9.4/lib/node_modules
$ thanks
šŸ’™  Reading direct dependencies from metadata in package.json...(node:31267) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: path must be a string or Buffer
(node:31267) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
šŸ’›  Reading direct dependencies from metadata in package.json...^CāŽ 

elmigranto avatar Feb 14 '18 04:02 elmigranto