Where are Global npm packages installed?

Install a npm package globally npm install -g <name> Installing without -g option will install a module to your working directory (in node_modules folder) Check where global packages/libraries are installed: npm list -g to see which global libraries are installed and where they’re located. Additionally --depth=0 can be used to avoid including every package’s dependencies in the tree view (show only the global packages that you installed, not dependencies of them)...

May 1, 2022 · 1 min · Anant