Skip to content
This repository has been archived by the owner. It is now read-only.

Convert Next Steps: Merge app.json into exp.json #11

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
3 participants
@ecbrodie
Copy link

commented May 25, 2017

This PR is a follow-up to the issue reported in this blog post. After converting an existing React-Native project to Expo using exp convert, the following error will occur in the XDE:

Error: Missing app.json. See https://docs.expo.io/

As reported in the blog post, the solution is to remove app.json after merging its contents to exp.json. It would be nice if this requirement (to not have app.json in the project anymore after conversion) was more explicitly stated. It would be especially helpful for those newer to the React-Native and Expo stacks like myself.

Although a great long-term fix would be to support automatic merging logic of app.json to exp.json (with a fallback to manual merge if there is a conflict), I think just simply mentioning the need for the merge is a great patch in the short term. I hope that this PR helps.

@anp anp requested a review from jesseruder May 25, 2017

@jesseruder

This comment has been minimized.

Copy link
Contributor

commented May 27, 2017

I'm a little confused how you end up in the situation where you have both app.json and exp.json. Can you explain how that happened @ecbrodie?

@anp

This comment has been minimized.

Copy link
Contributor

commented May 27, 2017

@jesseruder if you run exp convert it erroneously creates an exp.json file even though the new react-native-cli templates have an app.json for configuring icons.

@anp

This comment has been minimized.

Copy link
Contributor

commented May 27, 2017

Ideally we'd fix the bug in convert (I'm kind of in favor of just removing convert and writing it up as a doc instead).

@ecbrodie

This comment has been minimized.

Copy link
Author

commented May 27, 2017

@dikaiosune explained what happened correctly. I would create a non-Expo React-Native project and then decide immediately to convert it to an Expo project. Like so:

react-native init my-project # app.json created
cd my-project
exp convert # exp.json created

Although obviously not my call, I discourage removing exp convert. Documentation could theoretically exist to replace the script for converting to an Expo project. However, in my experience, automation will always trump over documentation-based list of steps to run. It would certainly reduce the barriers to entry for existing React-Native projects to adopt Expo.

This PR serves as a small stepping stone to reaching this ideal state. Once exp convert can better handle app.json merging into exp.json (or vice-versa), then the step I'm adding in to the Next Steps message can be removed.

@ecbrodie

This comment has been minimized.

Copy link
Author

commented Jun 12, 2017

@jesseruder @dikaiosune any updates on the status of this PR? I hope this can be of use to other new Expo developers like myself. Thank you.

@ecbrodie

This comment has been minimized.

Copy link
Author

commented Jul 8, 2017

Trying to close up loose ends on my open PRs. @jesseruder @dikaiosune do you have any update on the status of this PR? Feel free to close if you do not wish to accept this change. Thank you.

@anp

This comment has been minimized.

Copy link
Contributor

commented Jul 9, 2017

@ecbrodie thanks for the ping! Our template projects now come with app.json by default, which unfortunately makes this diff no longer accurate :(.

@anp anp closed this Jul 9, 2017

@ecbrodie

This comment has been minimized.

Copy link
Author

commented Jul 9, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.