Skip to content

Conversation

@TMisiukiewicz
Copy link
Collaborator

@TMisiukiewicz TMisiukiewicz commented Aug 9, 2024

Summary:

When dependency does not have platforms property in dependency config, the config command was breaking when passing --platform [platformName] when it was trying to read platforms from such dependencies.

E.g. @react-native-webapis/web-storage contains react-native.config.js file where platforms are not defined, so config was breaking when trying to access it.

Closes #2463

Test Plan:

  1. Run node ./path-to-cli/cli/build/bin.js config --platform ios
  2. Verify the output was returned properly
  3. Run node ./path-to-cli/cli/build/bin.js config --platform android
  4. Verify the output was returned properly

Checklist

  • Documentation is up to date to reflect these changes.
  • Follows commit message convention described in CONTRIBUTING.md

Copy link
Collaborator

@szymonrybczak szymonrybczak left a comment

Choose a reason for hiding this comment

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

Good find 👍

@szymonrybczak
Copy link
Collaborator

@micaww mind checking if the solution work? To test this change you can simple change the line inside node_modules/@react-native-community/cli-config/...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Config "--platform" arg causing builds to fail

2 participants