How do I list all globally installed packages? Also how to list packages installed locally for the project?
npm list gives long list of all packages and their dependencies as well
For globally installed packages
npm list -g --depth=0
For locally installed packages
npm list --depth=0