Skip to content
This repository has been archived by the owner on Jan 31, 2022. It is now read-only.

npx nx run-android appName runs start --ios instead of android app #4

Open
asherccohen opened this issue Dec 29, 2020 · 6 comments
Open
Labels
question Further information is requested

Comments

@asherccohen
Copy link

asherccohen commented Dec 29, 2020

https://github.com/JacopoPatroclo/nx-react-native-expo/blob/master/packages/react-native-expo/src/builders/run-android/run-android.impl.ts

I have checked source code and run-android has the same code as run-ios

@JacopoPatroclo
Copy link
Owner

JacopoPatroclo commented Dec 29, 2020

Hi, thanks for the issue. Fix in new version 0.0.7, let me know

@asherccohen
Copy link
Author

asherccohen commented Dec 29, 2020

Wow, thanks for the fast response!

Unfortunately I get this error after updating:

> nx run builders:run-android 
"start --android" is not an expo command. See "expo --help" for the full list of commands.

I would also argue that naming is wrong in this file as it states a relation to IOS which it doesn't have:
https://github.com/JacopoPatroclo/nx-react-native-expo/blob/master/packages/react-native-expo/src/builders/run-android/run-android.impl.ts

@JacopoPatroclo
Copy link
Owner

The command that the android builder is running is correct now expo start --android, as the docs shows. As for what you are pointing out is just some copy and paste errors, thery are not the couse of this error (fix it anyway, thanks for point it out). The problem was related to the escaping of the --android parameter. I pushed the fix and publish a new version as 0.0.8. Sorry for the inconvenience. commit as reference

@asherccohen
Copy link
Author

Great stuff! Thanks a lot.

I've worked on some modifications to adapt it to a next + react-native + expo setup. Do you mind if I fork this repo?
Also, can I suggest to add migrations to make it easier to update the plugin?
Not sure how to do that myself, but I've seen something on the https://github.com/ZachJW34/nx-plus repo.

Maybe we can take inspiration from there?

https://github.com/ZachJW34/nx-plus/tree/master/libs/vue/src

@JacopoPatroclo
Copy link
Owner

Sure no problem, if you think that someone else could benefit from your changes consider submitting a pull request.

For the migrations part, as I understand it, those are necessary only when nx update some base configuration (like migrating from e) or when we as a package update something. Correct me if I'm wrong but it looks to me that migrations are not necessary right now.

@asherccohen
Copy link
Author

asherccohen commented Dec 29, 2020

The changes I have made will make your config into an hybrid next.js app. Not sure you'll want this as a default for this project.
My initial idea was to have a separate plugin, but I can definetely issue a PR so we can discuss.

About migrations, you'll eventually have to update some packages, or make changes to some config.

Migrations let u define package update and scripts to automate changes to an existing repo, this particularly improves dev experience a lot, like what the core Nx team does.

Happy to investigate and share some thoughts here.

@JacopoPatroclo JacopoPatroclo added the question Further information is requested label Jan 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants