Skip to content

Conversation

@atlj
Copy link
Collaborator

@atlj atlj commented Nov 15, 2024

Summary

We were using npx to call the React Native Community CLI
for codegen. However, not every environment has npx available. This
adds custom logic to invoke the RNCCLI only using the node binary.

This also emits a better error message when the user doesn't have @react-native-community/cli installed on their library project.

Test plan

  1. Create a new architecture supported library
  2. Call yarn bob build --target codegen
  3. Make sure the command passes without any problems

atlj added 2 commits November 15, 2024 22:43
### SummaryWe were using `npx` to call the React Native Community CLI
for codegen. However, not every environment has `npx` available. This
adds custom logic to invoke the RNCCLI only using the node binary.###
Test plan1. Create a new architecture supported library2. Call `yarn bob
build --target codegen`3. Make sure the command passes without any
problems4. Call `yarn prepare`
@atlj
Copy link
Collaborator Author

atlj commented Nov 15, 2024

This will emit a much better error message in cases like #676

@atlj atlj merged commit 55eec1c into main Nov 15, 2024
28 of 29 checks passed
@atlj atlj deleted the @atlj/use-node-to-call-rncli branch November 15, 2024 20:28
@atlj atlj mentioned this pull request Nov 20, 2024
atlj added a commit that referenced this pull request Nov 21, 2024
### Summary

Fixes #691

We created a custom way of calling the React Native Community CLI with
#685. But it broke the easy workflow with monorepos. We made the
original change to be able to call codegen build from XCode actions but
since we dropped the support for that, we can revert the change back.
This keeps the new file but uses the old method of calling the cil
(npx).

### Test plan

1. Create a new project that supports the new architecture
2. Call `yarn prepare` and make sure everything passes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant