skip to Main Content

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


  1. npm list -g shows packages that are installed globally if you want to show installed packages for specific project remove the -g flag

    Login or Signup to reply.
  2. First you can do npm list (notice the lack of -g) to list of installed packages.

    You can open package.json and see the dependencies and devDependencies attributes to see the modules installed with npm or similar tools.

    You can open node_modules directory and see everything that is installed in there.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search