The doc instructions for installing and running the next branch produces AppRegistry.registerComponent wasn't called.
-- reproduction is here->WixSevenStarter
npx react-native init WixSevenStarterreact-native run-ios and project works.react-native-navigation with yarn add react-native-navigationnpx rnn-linkindex.js per docs to :import { Navigation } from "react-native-navigation";
import App from './App';
// import {name as appName} from './app.json';
// AppRegistry.registerComponent(appName, () => App);
Navigation.registerComponent('com.myApp.WelcomeScreen', () => App);
Navigation.events().registerAppLaunchedListener(() => {
Navigation.setRoot({
root: {
stack: {
children: [
{
component: {
name: 'com.myApp.WelcomeScreen'
}
}
]
}
}
});
});
yarn start --reset-cacheOutput is:
~/Downloads/WixSevenStarter wix-nav 30s
❯ yarn start --reset-cache
yarn run v1.22.5
$ react-native start --reset-cache
###### ######
### #### #### ###
## ### ### ##
## #### ##
## #### ##
## ## ## ##
## ### ### ##
## ######################## ##
###### ### ### ######
### ## ## ## ## ###
### ## ### #### ### ## ###
## #### ######## #### ##
## ### ########## ### ##
## #### ######## #### ##
### ## ### #### ### ## ###
### ## ## ## ## ###
###### ### ### ######
## ######################## ##
## ### ### ##
## ## ## ##
## #### ##
## #### ##
## ### ### ##
### #### #### ###
###### ######
warning: the transform cache was reset.
Welcome to React Native!
Learn once, write anywhere
To reload the app press "r"
To open developer menu press "d"
[Sun Oct 18 2020 15:42:14.273] BUNDLE ./index.js
[Sun Oct 18 2020 15:43:00.280] LOG Running "WixSevenStarter" with {"rootTag":1,"initialProps":{}}
[Sun Oct 18 2020 15:43:00.300] ERROR Invariant Violation: "WixSevenStarter" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.
Have I missed something?
@guyca Thank for the update. Still getting an error. Here is the result of running pod install --project-directory=ios
~/Github/WixSevenStarter wix-nav
❯ rm -rf node_modules && yarn
yarn install v1.22.5
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning "@react-native-community/eslint-config > @typescript-eslint/eslint-plugin > [email protected]" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[4/4] 🔨 Building fresh packages...
✨ Done in 34.09s.
~/Github/WixSevenStarter wix-nav 42s
❯ npx rnn-link
Running Android postlink script.
Linking MainApplication...
MainApplication already extends NavigationApplication, skipping.
NavigationReactNativeHost is already used, skipping.
SOLoader.init() is not called, skipping.
MainApplication.java linked successfully!
Linking MainActivity...
MainActivity already extends NavigationActivity
getMainComponentName function was not found.
MainActivity linked successfully!
Linking root build.gradle...
Kotlin version already specified
Kotlin plugin already declared
Already specified minSdkVersion 19
Root build.gradle linked successfully!
Running iOS postlink script.
Linking AppDelegate...
Removing Unneeded imports
No imports could be removed. Check the manual installation docs to verify that everything is properly setup:
https://wix.github.io/react-native-navigation/docs/installing#native-installation
AppDelegate already imports ReactNativeNavigation.h
Navigation Bootstrap already present.
extraModulesForBridge already present.
Removing Application launch content
No elements could be removed. Check the manual installation docs to verify that everything is properly setup:
https://wix.github.io/react-native-navigation/docs/installing#native-installation
AppDelegate linked successfully!
Updating Podfile...
RNN Pod has not been added to Podfile
React Native Navigation link is completed. Check the logs above for more information.
If any of the steps failed, check the installation docs and go through the necessary steps manually:
https://wix.github.io/react-native-navigation/docs/installing#manual-installation
When you're done, don't forget to update the index.js file as mentioned in docs!
Thank you for using React Native Navigation!
~/Github/WixSevenStarter wix-nav
❯ pod install --project-directory=ios
Auto-linking React Native module for target `WixSevenStarter`: ReactNativeNavigation
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `Folly` from `../node_modules/react-native/third-party-podspecs/Folly.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
[!] CocoaPods could not find compatible versions for pod "ReactNativeNavigation":
In Podfile:
ReactNativeNavigation (from `../node_modules/react-native-navigation`)
Specs satisfying the `ReactNativeNavigation (from `../node_modules/react-native-navigation`)` dependency were found, but they required a higher minimum deployment target.
~/Github/WixSevenStarter wix-nav
❯
@idkjs That bug has already been fixed in master but not yet released. For now you will have to manually set the deployment target in your Podfile to 11.0.
I had fixed it doing that but did not want to assume anything. Thanks.
Most helpful comment
@idkjs That bug has already been fixed in master but not yet released. For now you will have to manually set the deployment target in your Podfile to 11.0.