-
Notifications
You must be signed in to change notification settings - Fork 904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS autolinking not working in monorepo #633
Comments
require_relative '../../../../node_modules/@react-native-community/cli-platform-ios/native_modules' |
That actualyy didn't work. node_modules are in
|
use in react-native-app/package.json
My monorepo repository https://github.com/ryohlan/monorepo/blob/master/mobile/package.json |
I think this would be fixed in #768 |
@ryohlan can you explain why nohoist works please? |
@hindsricardo As using 'nohoist', selected libraries are installed child package's node_modules, not root package. |
In a monorepo you likely want to hoist libs to dedup them, so default Yarn behavior is good. You can (and should) update the relative path in the Podfile, to point wherever your RN node module is. |
Yes, it was a workaround temporary. |
Environment
System:
OS: macOS 10.15
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Memory: 255.71 MB / 8.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 10.15.3 - ~/.nvm/versions/node/v10.15.3/bin/node
Yarn: 1.16.0 - /usr/local/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v10.15.3/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.0, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0
Android SDK:
API Levels: 23, 25, 26, 27, 28
Build Tools: 23.0.1, 25.0.1, 25.0.2, 26.0.1, 26.0.2, 27.0.3, 28.0.0, 28.0.1, 28.0.2, 28.0.3
System Images: android-28 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.4 AI-183.5429.30.34.5452501
Xcode: 11.0/11M382q - /usr/bin/xcodebuild
npmGlobalPackages:
create-react-native-app: 2.0.2
react-native-create-library: 3.1.2
Description
I created a project with react native 0.60.4 in a monorepo (using yarn workspaces). The project has de following structure:
I followed the react native docs (https://github.com/react-native-community/cli/blob/master/docs/autolinking.md) on how to configure autolinking with custom roots, so I changed the paths in my Podfile to:
The problem is that when I run
pod install
it install only the react-native default dependencies and doesn't identify any fo the 3rd party libraries added to the app.Is the podfile configuration right? Should I run any other command to make it work?
The text was updated successfully, but these errors were encountered: