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

Compatibility with version 0.76.6 of react-native #131

Closed
qwertynik opened this issue Jan 31, 2025 · 9 comments
Closed

Compatibility with version 0.76.6 of react-native #131

qwertynik opened this issue Jan 31, 2025 · 9 comments
Labels
P3 Small fixes. Easy fixes to do in spare time. Ready Ready for release.

Comments

@qwertynik
Copy link

Namaste @birdofpreyru,

Thanks for this wonderful library. Hope you are doing well.

I am back to using this library in one of my own projects. However, I am unable to because the peer dependency for this project is 0.76.0 of react-native and the version I am using is 0.76.6. Since it is minor version difference, I assume this library should work. But I am not certain and am unable to proceed with the installation.

`

npm resolution error report

While resolving: [email protected]
Found: [email protected]
node_modules/react-native
react-native@"0.76.6" from the root project
peer react-native@"^0.76.0" from @dr.pogodin/[email protected]
node_modules/@dr.pogodin/react-native-static-server
@dr.pogodin/react-native-static-server@"" from the root project
peer react-native@"
" from @dr.pogodin/[email protected]
node_modules/@dr.pogodin/react-native-fs
peer @dr.pogodin/react-native-fs@">= 2.22.0" from @dr.pogodin/[email protected]
node_modules/@dr.pogodin/react-native-static-server
@dr.pogodin/react-native-static-server@"*" from the root project

Could not resolve dependency:
peer react-native@"^0.75.3" from [email protected]
node_modules/react-native-windows
peer react-native-windows@"^0.75.6" from @dr.pogodin/[email protected]
node_modules/@dr.pogodin/react-native-static-server
@dr.pogodin/react-native-static-server@"*" from the root project

Fix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.

`

Note: Currently, I used--force to proceed with the installation and the installation is complete. Will now use the library and see if it works.

@birdofpreyru birdofpreyru added the P3 Small fixes. Easy fixes to do in spare time. label Jan 31, 2025
@birdofpreyru
Copy link
Owner

@qwertynik I believe, it is safe to force-install it. It will be fixed by the update of dependencies in the next release.

@qwertynik
Copy link
Author

@birdofpreyru Performed a force install. Yet, I am unable to use the library. The error thrown is:

Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'ReactNativeFs' could not be found. Verify that a module by this name is registered in the native binary. [Component Stack]

for this line:
import {STATES, getActiveServerId} from "@dr.pogodin/react-native-static-server";

Not sure why it says ReactNativeFs though. Wondering if this error is because of not using the react-native-fs library that you forked and develop.

@birdofpreyru
Copy link
Owner

birdofpreyru commented Jan 31, 2025

Hmm... try to temporary pin @dr.pogodin/react-native-fs at v2.30.3... I guess, by default, it installed its latest v2.31.0 which already targets [email protected].

@qwertynik
Copy link
Author

I am using the version 2.20.0. "react-native-fs": "^2.20.0". Had installed it before installing the react-native-static-server package. I doubt if this could be leading to issues.

@qwertynik
Copy link
Author

Note: I am using this on an Expo project. (Created a development build in Expo). I don't see how this should prevent the react-native-static-server library from functioning.

@birdofpreyru
Copy link
Owner

I am using the version 2.20.0. "react-native-fs": "^2.20.0". Had installed it before installing the react-native-static-server package. I doubt if this could be leading to issues.

Agh, that's the problem then — my fork of react-native-fs is published to NPM under my scope, @dr.pogodin/react-native-fs, and it is not compatible with having the original rnfs in the same app.

@qwertynik
Copy link
Author

Ok. I am now attempting to use your library. Will make code changes and report back here if things are any better.

@qwertynik
Copy link
Author

Uninstalled the react-native-fs library and installed yours. The packages are now working. Had to do a force install. Thanks for your prompt response with the version number for react-native-fs library.

@qwertynik
Copy link
Author

@birdofpreyru

@birdofpreyru birdofpreyru added the Ready Ready for release. label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Small fixes. Easy fixes to do in spare time. Ready Ready for release.
Projects
None yet
Development

No branches or pull requests

2 participants