Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

npm can't list globally installed packages #10708

Closed
riyadhalnur opened this issue Dec 5, 2015 · 10 comments
Closed

npm can't list globally installed packages #10708

riyadhalnur opened this issue Dec 5, 2015 · 10 comments

Comments

@riyadhalnur
Copy link

npm ls -g --depth=0 can't list the installed packages.

NPM version 3.5.1 on 0.10.40 on OSX El Capitan

@riyadhalnur
Copy link
Author

Issue still persists in 3.5.2. Downgraded to 2.x for it to work

@othiym23 othiym23 changed the title NPM can't list globally installed packages npm can't list globally installed packages Dec 17, 2015
@othiym23 othiym23 added the bug label Dec 17, 2015
@othiym23
Copy link
Contributor

When you say "can't list the installed packages", do you mean that npm exits without producing a package listing? Or do you mean that the CLI crashes?

@riyadhalnur
Copy link
Author

@othiym23 it exits without producing a package listing

@chris-codaio
Copy link

Issue persisting in 3.5.3. This is painful for skipping install of global native packages.

@peter-mouland
Copy link

I have got this issue when I have manually removed local packages (rm -rf local-package) that were made global using npm link.
The invalid sym-links (symlinks that don't point to an existing directory) confuse npm. Removing those invalid symlinks, or using the unlink command before removing the directories fixes the issue.

Could this be your problem?

@riyadhalnur
Copy link
Author

I have never made a local package global manually.

@peter-mouland
Copy link

I also had the problem earlier this week (before i started using npm link), but i just removed all global packages (apart from npm) and reinstalled the couple I now use (i.e. I had grunt, gulp and many others that i forgot about since local packages are preferred).
I assume one of them must have something invalid going on...

@riyadhalnur
Copy link
Author

The issue was seen on v3 but not on v2, so I don't think any packages had anything to do with it.

@mbellerose
Copy link

I ran into this issue on Windows 7. I delete the ~\AppData\Roaming\npm folder and the problem went away. I did have to reinstall all my global packages.

@npm-robot
Copy link

We're closing this issue as it has gone thirty days without activity. In our experience if an issue has gone thirty days without any activity then it's unlikely to be addressed. In the case of bug reports, often the underlying issue will be addressed but finding related issues is quite difficult and often incomplete.

If this was a bug report and it is still relevant then we encourage you to open it again as a new issue. If this was a feature request then you should feel free to open it again, or even better open a PR.

For more information about our new issue aging policies and why we've instituted them please see our blog post.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants