Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listing globally installed packages #61

Open
elmigranto opened this issue Feb 14, 2018 · 0 comments
Open

Listing globally installed packages #61

elmigranto opened this issue Feb 14, 2018 · 0 comments

Comments

@elmigranto
Copy link

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⏎ 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant