Skip to content

Commit 6c075c0

Browse files
authored
fix(apple): help community modules find React Native (#2774)
1 parent 2cbd82e commit 6c075c0

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

packages/app/ios/test_app.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ def use_react_native!(project_root, project, options)
105105

106106
react_native_path = Pathname.new(project[:react_native_path])
107107

108+
# A significant number of community modules use this environment variable to
109+
# find React Native:
110+
# https://github.com/search?q=NOT+is%3Afork+language%3ARuby+REACT_NATIVE_NODE_MODULES_DIR&type=code
111+
ENV['REACT_NATIVE_NODE_MODULES_DIR'] = react_native_path.parent.to_s
112+
108113
include_react_native!(**options,
109114
app_path: find_file('package.json', project_root).parent.to_s,
110115
path: react_native_path.relative_path_from(project_root).to_s,

0 commit comments

Comments
 (0)