How to list npm user-installed packages

0 votes
How do I list the user-installed package ONLY in npm? When I do npm -g list it outputs every package and their dependencies, which is not what I want.
Jul 9, 2020 in Node-js by kartik
• 37,510 points
3,934 views

1 answer to this question.

0 votes

Hello @kartik,

This works pretty well too: 

npm list -g --depth=0
  • npm: the Node package manager command line tool
  • list -g: display a tree of every package found in the user’s folders (without the -g option it only shows the current directory’s packages)
  • depth 0 / — depth=0: avoid including every package’s dependencies in the tree view
Hope it helps!!
Thank you!!
answered Jul 9, 2020 by Niroj
• 82,880 points

Related Questions In Node-js

0 votes
1 answer

How to install a previous exact version of a NPM package?

Hello @kartik, If you have to install an ...READ MORE

answered Jul 8, 2020 in Node-js by Niroj
• 82,880 points
2,571 views
0 votes
1 answer

How do I send command line arguments to npm script?

Hello @kartik, The syntax is as follows: npm run ...READ MORE

answered Jul 8, 2020 in Node-js by Niroj
• 82,880 points
10,685 views
0 votes
1 answer

How to Install a local module using npm?

Hello @kartik, This is what worked for me: npm ...READ MORE

answered Jul 9, 2020 in Node-js by Niroj
• 82,880 points
8,810 views
0 votes
1 answer

How to use executables from a package installed locally in node_modules?

Hello @kartik, Use the npm bin command to get the ...READ MORE

answered Jul 13, 2020 in Node-js by Niroj
• 82,880 points
1,334 views
0 votes
1 answer

How to download and install Lavavel framework?

Hey @kartik, First you must have xampp install ...READ MORE

answered Mar 17, 2020 in Laravel by Niroj
• 82,880 points
1,113 views
0 votes
1 answer

Display Laravel in browser by using cmd promt?

Hello, First you need to have laravel install ...READ MORE

answered Mar 17, 2020 in Laravel by Niroj
• 82,880 points
967 views
0 votes
1 answer

How can we get started with Laravel through Xampp?

Hii, First you need to start Apache and ...READ MORE

answered Mar 17, 2020 in Laravel by Niroj
• 82,880 points
777 views
0 votes
1 answer

How to change Laravel official name to any customize name?

Hey, You just need to go Laravel folder through ...READ MORE

answered Mar 17, 2020 in Laravel by Niroj
• 82,880 points
2,643 views
0 votes
1 answer

How to find the version of an installed node.js/npm package?

Hello, npm view <package> version - returns the latest ...READ MORE

answered Nov 24, 2020 in Node-js by Niroj
• 82,880 points
6,142 views
–1 vote
1 answer

How to uninstall npm modules in node js?

Hello @kartik, The command is simply: npm uninstall ...READ MORE

answered Jul 8, 2020 in Node-js by Niroj
• 82,880 points
2,825 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP