thanks
thanks copied to clipboard
Listing globally installed packages
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ā