-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Since v0.8.2 @dr.pogodin/react-native-static-server
requires @dr.pogodin/react-native-fs
as a peer dependency, and it is incompatible with the original react-native-fs
library in the host project
#65
Comments
Read through the Releases page and found that 0.8.2 started using @dr.pogodin/react-native-fs. |
Same. |
Yes guys, it turns out React Native just does not link indirect native dependencies coming from RN libraries (react-native-community/cli#870), and although there is some work in that direction, for now such dependencies should be explcitly installed into the host codebase (https://github.com/callstack/react-native-builder-bob#how-do-i-add-a-react-native-library-containing-native-code-as-a-dependency-in-my-library). Thus, as a part of installing the latest RN Static Server you should also It is on me to update README, and |
@birdofpreyru After installing 0.8.3 using the recommended "npx install-peerdeps @dr.pogodin/react-native-static-server", then running pod install, makes it on iOS and Catalyst unable to build. Due to: "45 duplicate symbols for architecture x86_64" ... I guess running the "Original" RNFS and your fork of it in parallel is problematic.
|
Ogh… I see, to make it work for iOS / Mac I’d need to rename all top-level symbols in Objective-C code, or to wrap them in some namespace, to ensure no name clashes. Do you really need both new and old fs libs? Are you using those download & upload functionality in your app? |
I tried completely migrating to your RNFS fork and then realised that
Upload + Download aren't working yet ^^. I would also need the copyFolder function, which avmoroz specifically integrated upon my request as recursive copying of an entire folder on Windows took forever back then. Idk the state of your branch for this function, but I guess having both libraries in parallel would be the best for me for now. In my |
@birdofpreyru For now I can also just stay on 0.8.1 on macOS. |
@dr.pogodin/react-native-static-server
requires @dr.pogodin/react-native-fs
as a peer dependency, and it is incompatible with the original react-native-fs
library in the host project
Verifying
Yeah... I guess, you should be fine with v0.8.1 for time being — the primary difference of later versions is that they work on Windows with the latest RN versions, thanks to the migration to my RNFS fork, and attempting to use the original RNFS with the latest RN should crash on Windows anyway — thus, no real benefits of running my and the original RNFS side-by-side and upgrading to the latest static-server version. |
So, I guess, it is blocked until I have my RNFS version fully compatible with the original one, functionality-wise. |
Just out of curiosity: which part of the original RNFS wasn't working for you? Because I can build my fork of RNFS just fine on windows. I'm using downlaodFile, uploadFile, readFile, writeFile, stat, copyFile, copyFolder |
For me the original RNFS on Windows, with the latest RN, was just crashing the production build of Static Server's Example app on start-up. Do you mean it is not a problem with your fork in your app? Anyway, when upgrading my fork of RNFS to the new RN architecture, there is a need to change lots of function signatures to ensure they correctly linked with JS layer, and some argument types have to change, etc. So, it needs time, even if I am not touching internal implementation of the stuff at the moment. And also while on this I am writing tests and revising documentation for each function — there is a bunch of undocumented behavior nuances, inconsistent between platforms, which I wanna note, and potentially fix in the future. From your list I have not yet checked |
Hi @birdofpreyru ,Im having this error running on windows
BUILD FAILED in 8s |
@konami93 this probably should be a separate issue, and probably in the https://github.com/birdofpreyru/react-native-fs repo. I personally use Ubuntu for RN builds targeting Android; and the last time I tried to test Android builds on Windows, that did not work, at least for the new RN architecture, due to bugs in RN itself [#20]. I saw RN team is doing some stuff to fix builds on Windows, so probably once they claim it is fixed, I'll have a look whether it works for this library. |
I think I managed it on Windows, but I have a question @birdofpreyru. Can I use @dr.pogodin/react-native-static-server to run a nodejs server from a script.js? I have tried other libraries like nodejs-mobile-react-native but no results. This is like my last option. |
Hey @konami93 , I am not sure I understood this
But probably this is not what this library does, this library runs an HTTP server, specifically Lighttpd, to serve assets to, say, an internal webview in the host app, thus allowing, for example, to locally run a web app inside an RN app. If this is what you need — you are in the right place; if otherwise you are looking to emulate Node environment inside an RN app — this is not what this project is about. |
FYI @exotexot , I just released @dr.pogodin/react-native-fs v2.21.0-alpha.4, in which |
Will be closed after upgrade to @dr.pogodin/react-native-fs@2.22.0. |
On using the static server, the following error comes up
Any ideas why this error is coming up? The recommended steps to resolve the error are followed, but still the error persists.
On further searching, come across this issue on react-native-fs where you are shared your fork. Is there anything that needs to be done to get the library working?
The text was updated successfully, but these errors were encountered: