Skip to content

Commit ff37b14

Browse files
committed
ios build: yarn build on node_modules/react-native/react-native-codegen
We recently started building RN from Git, in 0509575. This caused an iOS build failure in the shell script '[CP-User] Generate Specs': Error: Cannot find module '/Users/chrisbobbe/dev/zulip-mobile/node_modules/react-native/packages/react-native-codegen/lib/cli/combine/combine-js-to-schema-cli.js' Note the last part: [...]/lib/cli/combine/combine-js-to-schema-cli.js' There is a [...]/src/[...] version of that file, but the /lib/ one is created by `yarn build`, and when I ran that, the app build succeeded.
1 parent 117864e commit ff37b14

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tools/postinstall

+9
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ patch_package() {
77
node_modules/.bin/patch-package
88
}
99

10+
# Since we take react-native from Git, some packages that ship with it
11+
# and are used in the build need their build scripts run.
12+
build_rn_packages() {
13+
( cd node_modules/react-native/packages/react-native-codegen/ && \
14+
yarn clean && node scripts/build.js )
15+
}
16+
1017
pod_install() {
1118
[[ "$OSTYPE" == "darwin"* ]] \
1219
|| return 0
@@ -31,6 +38,8 @@ jetify() {
3138

3239
patch_package
3340

41+
build_rn_packages
42+
3443
pod_install
3544

3645
jetify

0 commit comments

Comments
 (0)