Search code examples
gitreact-nativedependencieslibraries

React-Native Libraries: how to know which to add after cloning a git-project


How can I know which libraries to install when cloning a React Native project from Git? When I clone a project, InteliJ does a 'npm install' but not all the libraries used in the React Native project are installed, how can I quickly find out which ones were used and maybe also how to install them? (I thought I should be able to see this in package.json but in the last project I could not find any libraries that should be installed, like eg React Navigation) Thanks for replying or referring me to the right documentation.


Solution

  • Every library using on a React Native Project must be specified in the package.json file, more specifically on "dependencies or "devDependencies".

    Dependencies are specified in a simple object that maps a package name to a version range. The version range is a string which has one or more space-separated descriptors. Dependencies can also be identified with a tarball or git URL

    If there is some lib using in project that is not specified, it's wrong.