I am trying to list the installed packages for my react project. But when I run
npm list -g
I get:
C:UsersusernameAppDataRoamingnpm
└── (empty)
Even though I am running through VSC terminal and cd’ed into the correct directory…
I am trying to list the installed packages for my react project. But when I run
npm list -g
I get:
C:UsersusernameAppDataRoamingnpm
└── (empty)
Even though I am running through VSC terminal and cd’ed into the correct directory…
2
Answers
npm list -g
shows packages that are installed globally if you want to show installed packages for specific project remove the-g
flagFirst you can do
npm list
(notice the lack of-g
) to list of installed packages.You can open
package.json
and see thedependencies
anddevDependencies
attributes to see the modules installed withnpm
or similar tools.You can open
node_modules
directory and see everything that is installed in there.