Skip to content

Fix: Ensure 'invokeLibraryCodegen' task executes 'npx' correctly on all OS #707

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

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

ddiazFG
Copy link
Contributor

@ddiazFG ddiazFG commented Dec 3, 2024

@Important

feel free to close it if it only fails because a local configuration is incorrect.

Summary

Fixed the error "Execution failed for task ':app:invokeLibraryCodegen'" when running yarn android in the Fabric View Library. The invokeLibraryCodegen task now correctly executes npx on all platforms by checking the OS and using cmd or sh accordingly.

Test plan

Before the fix: Run yarn android on example forlder and observe the build failing with the mentioned error.
Apply the fix: Update the build script with the provided solution.
After the fix: Run yarn android again and confirm that the build succeeds without errors.

…ll OS

- Resolved an issue where 'invokeLibraryCodegen' failed with 'file not found' when running 'yarn android'.\n- Added OS-specific handling:\n  - On Windows: Use 'cmd /c' to execute the command.\n  - On other systems: Use 'sh -c' to execute the command.\n- This change ensures 'npx bob build --target codegen' runs successfully regardless of the operating system.
@ddiazFG ddiazFG force-pushed the fix-invoke-android-codegen branch from 1ed2242 to faa6c8f Compare December 3, 2024 04:44
Copy link
Member

@satya164 satya164 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR

@satya164 satya164 merged commit 2553e24 into callstack:main Dec 4, 2024
27 of 29 checks passed
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.

2 participants