Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Native Health Check CLI #73

Closed
deadcoder0904 opened this issue Dec 18, 2018 · 9 comments
Closed

React Native Health Check CLI #73

deadcoder0904 opened this issue Dec 18, 2018 · 9 comments
Labels
🗣 Discussion This label identifies an ongoing discussion on a subject

Comments

@deadcoder0904
Copy link

Introduction

A way to verify react-native installation is complete and working?

The Core of It

I was just checking out Flutter & I see there is a thing there called flutter doctor which ensures that installation is complete & working. I think it makes sense for React Native to have something like react-native doctor or react-native health or something else.

Discussion points

Might be beneficial for beginners who have a lot of trouble installing Android Studio if they are on anything else than a Mac

PS - I was gonna open this on RN repo but it sent me here so sorry if its not the right place to discuss. Happy to hear your thoughts?

@elicwhite
Copy link

These commands are often useful, but only if there are checks and fixes that can be made programmatically.

What things would be valuable to detect and surface here and how can we reliably detect them programmatically?

@deadcoder0904
Copy link
Author

deadcoder0904 commented Dec 18, 2018

What things would be valuable to detect and surface here and how can we reliably detect them programmatically?

Same as flutter doctor does it. Idk how they do it though.

Here's an output of the command flutter doctor -v in the terminal -

[✓] Flutter (Channel master, v1.1.2-pre.39, on Mac OS X 10.14.1 18B75, locale en-IN)
    • Flutter version 1.1.2-pre.39 at /Volumes/Coding/Code/Flutter/installation/flutter
    • Framework revision 0e9ad43416 (34 hours ago), 2018-12-16 16:39:28 -0500
    • Engine revision 4941125829
    • Dart version 2.2.0 (build 2.2.0-dev.1.1 f9ebf21297)

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at /Users/deadcoder0904/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 28.0.3
    • ANDROID_HOME = /Users/deadcoder0904/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    • ios-deploy 1.9.4
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 31.1.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[✓] VS Code (version 1.30.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 2.21.1

[!] Connected device
    ! No devices available

! Doctor found issues in 1 category.

@kelset kelset added the 🗣 Discussion This label identifies an ongoing discussion on a subject label Dec 18, 2018
@kelset kelset changed the title React Native Health Check React Native Health Check CLI Dec 18, 2018
@kelset
Copy link
Member

kelset commented Dec 18, 2018

There is currently a solution viable using https://github.com/infinitered/solidarity

@deadcoder0904
Copy link
Author

From what I see -

Solidarity is an environment checker for project dependencies across multiple machines.

Not sure if it's the same. Flutter doctor also shows Android & iOS installation, etc...

Plus it has some steps to follow rather than just doing react-native health.

Also preferably it can be built-in with react-native-cli :)

@kelset
Copy link
Member

kelset commented Dec 18, 2018

Absolutely, I want to have a doctor command in the CLI too.

I was just pointing out what is currently available for a RN dev.

And yeah tbh this is more of a Feature Request for the new CLI repo

@matt-oakes
Copy link
Member

Solidarity could be a good base for it though. It has rules to check that commands exist (can be used to check Xcode and command line tools are installed) and that environment variables are set (For ANDROID_HOME).

As solidarity is an npm module, the react-native CLI could depend on it and call it using a solidarity settings file that it ships. That way the heavy lifting is done by the solidarity module but users get the convenience of not needing to set it up.

@deadcoder0904
Copy link
Author

@kelset Cool, should I open it there instead?

@matt-oakes good idea :)

@kelset
Copy link
Member

kelset commented Dec 18, 2018

yeah probably it would be better.
Maybe open it, then close this with a comment linking to it :)

Btw if you want other examples of CLIs with sanity checks, brew has one (along with some other cool cleanup commands).

@deadcoder0904
Copy link
Author

Moved to react-native-community/cli#51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🗣 Discussion This label identifies an ongoing discussion on a subject
Projects
None yet
Development

No branches or pull requests

4 participants