Skip to content

Commit 1db6467

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 2825ed7 commit 1db6467

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tools/postinstall

+13
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ 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+
(
14+
cd node_modules/react-native/packages/react-native-codegen/
15+
# A copy of the package's `yarn build` script
16+
# with a `--verbose` flag removed.
17+
yarn clean && node scripts/build.js
18+
)
19+
}
20+
1021
pod_install() {
1122
[[ "$OSTYPE" == "darwin"* ]] \
1223
|| return 0
@@ -31,6 +42,8 @@ jetify() {
3142

3243
patch_package
3344

45+
build_rn_packages
46+
3447
pod_install
3548

3649
jetify

0 commit comments

Comments
 (0)