Skip to content
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

To mant issue, unable to install #80

Closed
1-AlenToma opened this issue Oct 25, 2023 · 3 comments
Closed

To mant issue, unable to install #80

1-AlenToma opened this issue Oct 25, 2023 · 3 comments

Comments

@1-AlenToma
Copy link

Hi, so I found this lib for which is support windows.

Bu I am not able to install it, I am getting to many error when I try to.

  "dependencies": {
    "react": "18.1.0",
    "react-native": "0.70.14",
    "react-native-windows": "0.70.21"
  },

Errors

npm i @dr.pogodin/react-native-static-server
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react-native
npm ERR!   react-native@"0.70.14" from the root project
npm ERR!   peer react-native@"*" from @dr.pogodin/[email protected]
npm ERR!   node_modules/@dr.pogodin/react-native-static-server
npm ERR!     @dr.pogodin/react-native-static-server@"*" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native@"^0.72" from @dr.pogodin/[email protected]
npm ERR! node_modules/@dr.pogodin/react-native-fs
npm ERR!   peer @dr.pogodin/react-native-fs@">=2.21.0-alpha.1" from @dr.pogodin/[email protected]
npm ERR!   node_modules/@dr.pogodin/react-native-static-server
npm ERR!     @dr.pogodin/react-native-static-server@"*" 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\alent\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

Any help solving thia?

@1-AlenToma
Copy link
Author

1-AlenToma commented Oct 25, 2023

Ok found the issue here.

[react-native-fs] have those packages which I am not able to have now.

Is there a specific reason for this ?

 "peerDependencies": {
    "react": "*",
    "react-native": "^0.72",
    "react-native-windows": "^0.72"
  },

@birdofpreyru
Copy link
Owner

Hi @1-AlenToma ,

Check this out — somebody tried to use my fork of react-native-fs with RN 0.70 on Windows, and it did not work for him; although that worked for him with RN 0.72:

After that I declared required RN peer dependency as v0.72.

@birdofpreyru
Copy link
Owner

Perhaps, try to use v0.7.13 of react-native-static-server — it does not rely on my fork of react-native-fs, but on the old original react-native-fs, though that one does not work out of the box for Windows, so it requires to separately grab and add to the project a few files (you may check how it was done in the example app — https://github.com/birdofpreyru/react-native-static-server/tree/d88ba3b2571434c76c3c39aedc0a292375fda034/example/windows/ReactNativeStaticServerExample — pay attention to RNFSManager.cpp and RNFSManager.h files).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants