Calculates on this device. File exports run online.
React Native Dependency Checker
Paste or open package.json and the lock file of your app, and press Check the dependencies. The page compares them and lists every problem it finds: a lock file that is out of date, versions outside their ranges, missing packages, peer dependencies that do not match, packages in several versions and deprecated packages.
Enter your values
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your result will show here
Fill in the values, then choose Check the dependencies.
Your result
How it was worked out
How to check your app
- Open package.json in the first box and package-lock.json (or yarn.lock) in the second. Both are in the main folder of the app.
- Type the Node.js version you build with (the answer of node --version) if you want the engines of the packages compared with it.
- Press Check the dependencies and read the problems, errors first.
- For a whole project with workspaces, or lock files larger than 5 MB, choose the files or a ZIP of the project in the box below.
What is checked
- Lock out of date: npm keeps a copy of the dependencies of package.json in the lock file. When the two differ, or yarn.lock has no entry for a dependency, the lock file was made for another package.json. Run npm install or yarn install again.
- Not installed and Wrong version: each dependency is looked up in the lock file as Node.js finds it, and its version is compared with the range in package.json.
- Missing dependency: a package in the lock file needs another package that the lock file does not have where that package can find it.
- Peer dependencies: many React Native libraries name the react and react-native versions they work with as peer dependencies. Each one is compared with the version in the lock file. Optional peers are left out when they are not installed.
- Several versions: one package in several versions. For react this is an error: two copies of React can break hooks, as react.dev explains on its page “Invalid Hook Call Warning”.
- Deprecated: the message that npm wrote into the lock file for a deprecated package.
- Node.js version: the engines field of each package against the Node.js version you typed.
Version ranges
- Ranges follow the rules of node-semver, which npm uses:
^1.2.3is at least 1.2.3 and below 2.0.0,^0.2.3is below 0.3.0,~1.2.3is below 1.3.0, and1.2.3 - 2.3is at least 1.2.3 and below 2.4.0. - A version with a pre-release, such as 1.3.0-rc.1, matches a range only when the range names a pre-release of 1.3.0 itself.
- Git addresses, local folders, web addresses, workspaces and tags such as latest are not ranges; they are listed as not checked.
Limits you should know
- Only what package.json and the lock file say is used. Nothing is installed or downloaded, and no list of security advisories or of newer versions is looked up: for known vulnerabilities use the Dependency Vulnerability Checker.
- yarn.lock version 1 has no peer dependencies, deprecated messages or engines, so those checks need a package-lock.json. Lock files of Yarn 2 and later (Berry) and pnpm-lock.yaml are not read.
- Native parts of an app (CocoaPods, Gradle) are not checked.
- The example on the page is made up to show the checks: its versions and peer rules are not facts about those packages.