Skip to content

Commit eb3bccb

Browse files
Saadnajmiclaude
andauthored
fix: resolve cli-platform-apple from cli-platform-ios path for pnpm (#2945)
## Summary - Re-applies the fix from #2820 that was inadvertently reverted in #2917 - In pnpm setups, `@react-native-community/cli-platform-apple` is a transitive dependency of `cli-platform-ios` and not directly resolvable from the project root — resolve `cli-platform-ios` first and use its path as the starting directory Fixes #2944 ## Test plan - Verified in a pnpm monorepo that `cli-platform-apple` resolves correctly and the `macos` platform is registered 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent eda57a2 commit eb3bccb

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

packages/react-native/react-native.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,13 @@ try {
7171
// [macOS
7272
let apple;
7373
try {
74+
const iosPath = require.resolve('@react-native-community/cli-platform-ios', {
75+
paths: [process.cwd()],
76+
});
7477
// $FlowFixMe[untyped-import]
7578
apple = findCommunityPlatformPackage(
7679
'@react-native-community/cli-platform-apple',
80+
iosPath,
7781
);
7882
} catch {
7983
if (verbose) {

0 commit comments

Comments
 (0)