Skip to content

Commit 74fda10

Browse files
Fix rn config file load codegen (#34895)
Summary: Resolves #34894 ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [General][Fixed] - Load react-native.config.js from correct path during codegen Pull Request resolved: #34895 Test Plan: Command line output after fix with extra console logs to show the correctness ( hopefully :) ) of the fix. ```bash ~/repos/sentry-react-native � � krystofwoldrich/multipleRNsamples ± �node node_modules/react-native/scripts/generate-artifacts.js --path sample-new-architecture --outputPath codegen [Codegen] Processing react-native core libraries [Codegen] Found react-native [Codegen] >>>>> Searching for codegen-enabled libraries in /Users/krystofwoldrich/repos/sentry-react-native/node_modules [Codegen] >>>>> Searching for codegen-enabled libraries in react-native.config.js cwd /Users/krystofwoldrich/repos/sentry-react-native rnConfigFilePath sample-new-architecture/react-native.config.js rnConfigFilePath - resolved /Users/krystofwoldrich/repos/sentry-react-native/sample-new-architecture/react-native.config.js [Codegen] Found sentry/react-native [Codegen] >>>>> Searching for codegen-enabled libraries in the app [Codegen] >>>>> Processing FBReactNativeSpec [Codegen] Generated schema: /var/folders/tl/jddrmdy97gj0cljrcwb_qkzc0000gn/T/FBReactNativeSpecrHeknw/schema.json [Codegen] Generated artifacts: codegen/build/generated/ios [Codegen] >>>>> Processing rncore [Codegen] Generated schema: /var/folders/tl/jddrmdy97gj0cljrcwb_qkzc0000gn/T/rncorehCjmlJ/schema.json [Codegen] Generated artifacts: codegen/build/generated/ios [Codegen] >>>>> Processing RNSentrySpec [Codegen] Generated schema: /var/folders/tl/jddrmdy97gj0cljrcwb_qkzc0000gn/T/RNSentrySpectMmDpf/schema.json [Codegen] Generated artifacts: codegen/build/generated/ios >>>>> Creating component provider Generated schema list: /var/folders/tl/jddrmdy97gj0cljrcwb_qkzc0000gn/T/rn-tmp-schema-list.json Generated provider in: codegen/build/generated/ios [Codegen] Done. ``` Reviewed By: rshest Differential Revision: D40177746 Pulled By: rshest fbshipit-source-id: 970f016db26fda003ee3b47d50e80549fdb88415
1 parent db8c11d commit 74fda10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/codegen/generate-artifacts-executor.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ function handleLibrariesFromReactNativeConfig(
216216
`\n\n[Codegen] >>>>> Searching for codegen-enabled libraries in ${rnConfigFileName}`,
217217
);
218218

219-
const rnConfigFilePath = path.join(appRootDir, rnConfigFileName);
219+
const rnConfigFilePath = path.resolve(appRootDir, rnConfigFileName);
220220

221221
if (fs.existsSync(rnConfigFilePath)) {
222222
const rnConfig = require(rnConfigFilePath);

0 commit comments

Comments
 (0)