« Back to Blogs

How React-Native Doctor Can Simplify Your Work

The doctor is a command of react-native which you can use to check your development environment issues. It will simplify your work and save hours of headache. The doctor command provides a facility to fix the issue automatically related to the development environment.

 

If the issue is not fixed by the doctor automatically, then it will give the related links to fix the issue easily. You can learn more about react-native doctor.

 

The following libraries are supported by the doctor command which is associated with react native.

 

  • Android SDK
  • Cocoapods
  • Xcode

How to use react-native doctor

The doctor command is available from react-native version 0.62 onwards.

So, if you have an older version of react-native installed and want to use the doctor command without upgrading your version then you can try the following command.

  • npx @react-native-community/cli doctor

The npx will check whether a package exists in your current project. If not then it will temporarily install the package and run it.

By running this command you will get the following checks :


 

Doctor couldn’t resolve the error automatically, so it gives a link as you can see in the image below :

What are the checks that are currently supported by a doctor

The following checks are supported by a doctor:

  • node.js should be >= 8.3
  • yarn should be >= 1.10
  • npm should be >= 4
  • watchman should be >= 4

Checks for the Android environment:

  • Android SDK(software development toolkit) should be >= 26
  • Android NDK(native development toolkit) should be >= 19
  • ANDROID_HOME availability is an environment variable that is required by the Android SDK setup

Checks for the iOS environment:

  • Xcode should be >= 10 - it is an IDE to develop, build and ship iOS applications
  • CocoaPods - is a library dependency management tool for iOS applications
  • Ios-deploy - it is a library that is used internally by the CLI to install applications on a physical iOS device

The user can speed up the development process of building apps by simply running doctor and stop wasting time in fixing the errors. We are expertise in providing mobile applications using React Native framework. Contact us for more information.

Next
contact-us Request a callback WhatsApp