-
Notifications
You must be signed in to change notification settings - Fork 905
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
Properly configuring cli #717
Comments
We're still working on better story for monorepos, as current support is quite tricky to get and it seems like we lack some documentation around it as well. |
Might I suggest that you add some config for where the actual react-native project lives? So that we can get the config correctly from the workspace we want to target? For now, we have no other way than replacing the line in your code with |
Ok, I figured out how to make this work. In this line you have If I replace So, if you in |
This issue will be closed once my PR is merged, which describes how to properly configure the CLI in a monorepo-like environments. Thanks for the investigation here and time spent! It was really helpful while working on the PR. |
Question was originally asked here, but I still have no answer, so I will make a new issue for it instead.
I am also getting this error(
"Text must not be null or empty"
), and I cannot seem to configure it correctly with the current options(I am hoping there is something I missed 😊 )currently we have a structure like
Setting root to the project root, it will try to run
node ./node_modules/react-native/cli.js config
in the project root, and report error on this line :this.packageName = json["project"]["android"]["packageName"].
Setting the root to
rn-app-1
, gives error on this linedef json = new JsonSlurper().parseText(reactNativeConfigOutput)
Both errors makes sense, since the project root does not contain an rn app, and
./node_modules/react-native/cli.js
is not a valid path from the workspace root.What does work is keeping the root at the rn-app-1 workspace and change the command to
/node_modules/.bin/react-native config
.I know there is an option using the
nohoist
of react-native, but I would rather not, since DX is quite bad, we had it before, and upgrading dependencies could take up to 15 minutes ⌛️So, is there some setting I have missed, or would there be a possibility to add some config to tell rn-cli where to look for the rn-app config?
The text was updated successfully, but these errors were encountered: