mikehardy / react-native-update-apk

Update apk from non-play store servers, and update ios from app store in React Native.
MIT License
193 stars 57 forks source link

Help needed #39

Closed AlenToma closed 3 years ago

AlenToma commented 3 years ago

Im having trouble installing the require dependency on my project. please have a look

warn Calling react-native link [packageName] is deprecated in favor of autolinking. It will be removed in the next major release.
Autolinking documentation: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md
error Unknown dependency. Make sure that the package you are trying to link is already installed in your "node_modules" and present in your "package.json" dependencies. Run CLI with --verbose flag for more details.
Waiting for the debugger to disconnect...
npm ERR! code 1
npm ERR! path D:\Projects\NovelManager
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c react-native link react-native-fs

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\alen\AppData\Local\npm-cache\_logs\2021-01-31T22_59_45_045Z-debug.log
Waiting for the debugger to disconnect...
PS D:\Projects\NovelManager> npm i react-native-fs
Debugger attached.
npm ERR! code ERESOLVE
npm ERR!
npm ERR! While resolving: novelmanager@0.0.1
npm ERR! Found: react-native@0.63.4
npm ERR! node_modules/react-native
npm ERR!   react-native@"^0.63.4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native@"^0.59.5" from react-native-fs@2.16.6
npm ERR! node_modules/react-native-fs
npm ERR!   react-native-fs@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\alen\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\alen\AppData\Local\npm-cache\_logs\2021-01-31T23_00_09_833Z-debug.log
Waiting for the debugger to disconnect...
PS D:\Projects\NovelManager> npm install react-native-fs --save
Debugger attached.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: novelmanager@0.0.1
npm ERR! Found: react-native@0.63.4
npm ERR! node_modules/react-native
npm ERR!   react-native@"^0.63.4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native@"^0.59.5" from react-native-fs@2.16.6
npm ERR! node_modules/react-native-fs
npm ERR!   react-native-fs@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Package.json

  "dependencies": {
    "@expo/metro-config": "^0.1.52",
    "@react-native-community/masked-view": "^0.1.10",
    "@react-navigation/bottom-tabs": "^5.11.7",
    "@react-navigation/material-top-tabs": "^5.3.13",
    "@react-navigation/native": "^5.9.2",
    "@react-navigation/stack": "^5.14.2",
    "eslint-plugin-react-hooks": "^4.2.0",
    "expo": "^40.0.1",
    "expo-asset": "^8.2.2",
    "expo-document-picker": "^8.4.1",
    "expo-file-system": "~9.3.0",
    "expo-media-library": "~10.0.0",
    "expo-notifications": "^0.8.2",
    "expo-sqlite": "^9.0.0",
    "i": "^0.3.6",
    "install": "^0.13.0",
    "node-html-parser": "^2.0.2",
    "npm": "^6.14.11",
    "react": "~16.13.1",
    "react-native": "^0.63.4",
    "react-native-eject": "^0.1.2",
    "react-native-elements": "^3.1.0",
    "react-native-gesture-handler": "^1.9.0",
    "react-native-pin-parallax-view": "^0.0.6",
    "react-native-progress": "^4.1.2",
    "react-native-reanimated": "^1.13.2",
    "react-native-render-html": "^5.0.1",
    "react-native-safe-area-context": "^3.1.9",
    "react-native-screens": "^2.17.1",
    "react-native-unimodules": "^0.12.0",
    "react-native-vector-icons": "^8.0.0",
    "react-native-webview": "^11.2.1",
    "recyclerlistview": "^3.0.5",
    "rn-update-apk": "^4.5.1",
    "update": "^0.7.4"
  },

Im unable tp upgrade react, to a higher version due to dependency other packages have with it, So what should i do?

mikehardy commented 3 years ago

react-native at 0.63.4 is fully capable of running this package without manually linking. There is an example in this project, including a script that builds the example https://github.com/mikehardy/react-native-update-apk/blob/master/refresh-example.sh Follow the script and it will show you how to install this module, it will work fine I can't help beyond that, you'll have to make it work. Looks to me like this module is not really the problem, based on your error output though. Some problem with react-native-fs. I use react-native-fs some and perhaps if you just update it you'll be fine.