Commit b901cec
fix(0.81): use yarn pack + yarn add to match normal install flow
Replace npm install --install-links with yarn pack + yarn add.
npm install <local-path> creates a symlink, and --install-links
copies files but without pre-generated codegen headers. Both
diverge from a normal user's install in ways that break the build:
1. Symlinks cause Node module instance duplication (bundle.js loads
@react-native/metro-config from the monorepo while metro.config.js
loads it from the test project — setFrameworkDefaults misses).
2. Missing React/FBReactNativeSpec/ headers (generated by prepack.js,
shipped in published tarballs). Without them the codegen regenerates,
but the upstream react-native's FBReactNativeSpec processes first,
creating the directory — then the fork's version is skipped by
shouldSkipGenerationForFBReactNativeSpec(), leaving headers without
macOS-specific fields (critical, modal, defaultInputs).
yarn pack runs the prepack script (generating the codegen headers)
and produces a tarball identical to what npm publish would create.
yarn add installs it as a regular package — no symlinks, correct
headers, matching the normal user flow exactly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 7185e9a commit b901cec
1 file changed
Lines changed: 9 additions & 8 deletions
Lines changed: 9 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
0 commit comments