Home > Back-end >  How to find out a library is installed in React js?
How to find out a library is installed in React js?

Time:10-11

I wanted to know if I have already installed prop-types library in React Js .Is there any command line code to get the installed libraries in React js?

CodePudding user response:

If you are not adding any arguments to the npm install command, it installs all items in your package.json. There are all installed in that directory in the node_modules folder. This is a faculty of NPM and does not really have anything specifically to do with React Native (which makes me hope I understand your question correctly :\ ).

The below command will give you the list of npm packages installed in the current directory.

npm ls --depth=0 You can set the depth value to see the dependency of the installed packages. i.e. npm ls --depth=1

To get the list of globally installed npm package list

npm ls -g --depth 0

CodePudding user response:

npm list -g --depth=0

Try this

  • Related