Description
Description
When building RNTester on iOS with the old architecture, we skip a call to build_codegen
, which will build the JS package at packages/react-native-codegen
. This is needed for the Xcode Script phase Generate Specs
. For some reason, this only happens on main
and not 0.71-stable
(where packages/react-native-codegen
doesn't need to be built for some reason).
In React Native macOS, we fixed this by ensuring the ruby method build_codegen
is called for both paper and fabric.
Version
nightly
Output of npx react-native info
System:
OS: macOS 13.2
CPU: (12) arm64 Apple M2 Max
Memory: 22.18 GB / 64.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.14.0 - ~/.asdf/installs/nodejs/18.14.0/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 9.3.1 - ~/.asdf/plugins/nodejs/shims/npm
Watchman: Not Found
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: 2022.1 AI-221.6008.13.2211.9514443
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: Not Found
npmPackages:
@react-native-community/cli: Not Found
react: Not Found
react-native: Not Found
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
- Clone React Native
yarn install
cd packages/rn-tester
- Modify
Podfile
to disable fabric (fabric_enabled = false
) bundle install && bundle exec pod install
xcodebuild -workspace RNTesterPods.xcworkspace -scheme RNTester -configuration debug -sdk iphonesimulator
- Or if you prefer, run
yarn test-ios
from the root of the repo. I'd disablexcpretty
as it suppresses the error message.
Expected result: Build succeeds
Actual result: Build fails with error:
Error: Cannot find module '/Users/sanajmi/workspace/react-native/packages/react-native-codegen/lib/cli/combine/combine-js-to-schema-cli.js'
Snack, code example, screenshot, or link to a repository
N/A, since this is building React Native off of the public Github repo. The Repro steps above should suffice.