0

I am trying to add Wix navigation library to my project according to https://wix.github.io/react-native-navigation/#/docs/Installing but when i run the npm install --save react-native-navigation command in terminal and then i open my android project in android studio, i don't see any library module for navigation in my project. But the name of react-native-navigation will appear in package.json file.

here is my package.json file:

      {
  "name": "PleaseAnswer",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "react": "16.6.3",
    "react-native": "0.57.8",
    "react-native-navigation": "^2.5.0"
  },
  "devDependencies": {
    "babel-jest": "23.6.0",
    "jest": "23.6.0",
    "metro-react-native-babel-preset": "0.51.1",
    "react-test-renderer": "16.6.3"
  },
  "jest": {
    "preset": "react-native"
  }
}   
Jeel Vankhede
  • 11,592
  • 2
  • 28
  • 58
anna
  • 95
  • 3
  • 16

1 Answers1

0
  • Android: if you're using V2 version than react-native link won't automatically link your package to android. I would recommend you to follow docs https://wix.github.io/react-native-navigation/#/docs/Installing
  • iOS: I recommend you to use cocoapods for iOS configuration
    Add pod 'ReactNativeNavigation', :path => '../node_modules/react-native-navigation' in your podfile and run pod install
Aayush Thapa
  • 161
  • 2
  • 6
  • I have done exactly like the link you've sent. But when I run 'npm install --save react-native-navigation ' command the module does not add to my project. It means that the installation is not successful. I have spent 5 days on it...please save my life. – anna Jan 07 '19 at 07:38
  • It's quite unclear what you are saying. `npm install --save react-native-navigation` does not automatically link package to your native folders. Did you configure in android and ios folder? – Aayush Thapa Jan 07 '19 at 09:32
  • Finally I could solve it. I did all the steps before and the package library added to my project but it didn't work and the react-native didn't recognized react-native-navigation. last night I did all the steps again and I ran the command in android studio terminal (after doing all steps) to fix my problem but the package disappear! I think it was a wrong job! anyway the real problem was the conflict between compile and run-time versions. I found my answer in this link: [here](https://stackoverflow.com/questions/44653261/android-dependency-has-different-version-for-the-compile-and-runtime) – anna Jan 07 '19 at 10:19