I'm working on ubuntu 14.04
, Is there any way to print all global modules (installed using npm
) to the command line. How can I do this?
Then you just use the npmlist command to get a formatted and color listing with versions of all global packages.
Checking globally installed packages To check for all globally installed packages and its dependencies, run the npm list command followed by the -g flag.
To view the npm global packages list and their dependencies, you can run the following npm list command followed by the “-g” flag where g stands for global. As you can see in the above result, all the global packages are displayed in a tree-like structure.
On Unix systems they are normally placed in /usr/local/lib/node or /usr/local/lib/node_modules when installed globally. If you set the NODE_PATH environment variable to this path, the modules can be found by node.
The below command will list all your globally installed modules on Linux, Mac, and Windows.
npm ls -g --depth 0
To list all globally installed modules run:
npm ls -g --depth 0
or yarn
yarn global ls --depth 0
Extras:
To get a short module description run:
npm ll -g --depth 0
To see the path of where the global modules are installed run:
npm ls -gp --depth 0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With