Skip to content

Properly configuring cli #717

@tbergquist-godaddy

Description

@tbergquist-godaddy

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

root/
  node_modules/
  apps/
      web/
      rn-app-1/
      rn-app-2/
  packages/
      shared-components/

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 line def 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions