Outdated React Native Project - react-native

I posted this question yesterday, but apparently worded it badly, so I'm trying again.
I'm working on a project that had been closed for a couple of years and reopened. During that time, a large number of the included node_modules have gone out of support (or at least the versions being used), React Native has been updated several times, new rules came out for building iOS projects, etc. leaving the project in a pretty broken state.
The previous team that worked on the project didn't leave much in the way of documentation, and we're stuck figuring out the details on our own.
There are two of us on the UI development, and we're able to build the project as-is using all of the old components. However, as soon as we start upgrading anything, we run into conflicts.
I've spent a good bit of time (several different times combined) trying to find a way to get the upgrade started, but everything I've tried runs into conflicts.
For purposes of clarity, he problems that I encounter include:
npm reports ERESOLVE Unable to resolve dependency tree
many errors (hundreds) come out of the XCode build - version compatibility, not allowed to use deprecated components, legacy build system outdated, conflicting pointer assignments, etc
All tools need to be upgraded (Node, npm, Android Studio, Xcode, React, React Native, Gradle, etc
Is there somewhere I can find an article or tutorial or something with a step-by-step, repeatable process for creating a project from scratch and adding the required components in an orderly way so that I can upgrade the whole process at once?
Also, I know that a lot of open source projects support their products with paid services, but that doesn't appear to be the case with React Native as far as I can tell. Is there somewhere we can find a project / build expert to come in and work with us on this?
Any help would really be appreciated!
Thanks in advance!

Related

VS 2022 hangs after unloading a project everytime

I have a react project which I need to unload from my solution because I build it separately.
Every time I try to unload that project, my VS 2022 goes into a hung state.
Has anyone experienced the same?
Yes, I was experiencing this same thing until just now with VS 2022 Community v17.2.6.
I was trying to unload a GraphQL since I don't really care about that project, it's only on the same folder/repo.
I went into Tools -> Get Tools and Features... and uninstalled Node.js development. That did the trick, although I guess it might be because now it doesn't load the project to start with, it shows as "incompatible". Luckily I don't do any Node.js development in VS.
If yours is a Node.js project too you could try this, or maybe try a fresh install only including the most basic things to see if it works that way, and keep adding tools and features until you find which one is the problematic one.
I am also experiencing the same problem.
In my case, it happens when I switch branches with the VS solution open. It hangs while trying to unload one or more projects. The solution has ASP.Net MVC and C# projects.
So far I didn't find how to fix this.

How to troubleshoot React Native build error?

Below you can see the output I get when I try to run npx react-native run-android. It suggests some options to try in order to further pinpoint the problem, however they don't work with the aforementioned command so I assume that they are related to a gradle (just an educated guess).
I know ZERO about gradle; I have just seen the name here and there and in the output shown below. So please keep that in mind when you answer. If I need to learn how to run some gradle command(s) directly, please be as verbose as possible in your answer.
The project was working fine just a bit ago, but I wanted the ability to force portrait mode for certain screens but without configuring my entire app to always have to stick to portrait mode. So I found what looked to be a solution in the react-native-orientation-locker module. I installed it with yarn and then proceeded to update files as directed: https://www.npmjs.com/package/react-native-orientation-locker.
After updating the appropriate files, I got an error that suggested axios was the problem. I uninstalled and reinstalled axios. After that didn't work, I proceeded to undo all the file changes I had just made. Then I uninstalled the react-native-orientation-locker module.
To my knowledge, I have undone everything I did between the time the project worked and stopped working.
Sadly, I had not put this into source control yet (a mistake I won't make again), so I can't revert.
Where to go from here?
Problems like this are hard to pin point. What you can do is open the android project in android studio and see the logs as the project is being assembled. I assume you do not have much knowledge about android either so you might need some senior resource to help you.
What I usually do in this case is open android studio and if I am lucky enough, it tells me which file has an issue and I go to the file and do what android studio suggests me. Some times it fixes the problem and sometimes it doesn't.
Another thing I would like to mention is that the documentation of the package you are using is important to follow. I assume you did that already but I would suggest to review it narrowly and closely.
Another guess I can tell you is try to go to your-project/android/build.gradle and over there, you'll see something like this in the start. The package you are using mentions something about target SDK 27. I think you should check that out too. May be it helps
Lastly I would say always use source control while working with react native. It can easily blow up at any time so you should always have a safety net to fallback to :)

How to upgrade Aurelia project from version v0.24.0 to current version v1.2.3

I'm trying to upgrade a very old version of Aurelia CLI project v0.24.0 to the current version v1.2.3. I've tried to follow the steps from this link from the docs but when I try to run it I receive this error:
So my question is what is the best approach to upgrade it from such an old version to the newest one?
Just a screenshot of error is too little info to give proper advice on. And between the currently latest version of v1.2.3 and v0.24.0 (Jan, 2017) there's roughly 3 years. Fun part is, you'd be amazed at relatively how little Aurelia core itself has changed. Simply because a lot remained stable.
Most impactful changes will be in either:
aurelia_project folder, with the build and config routines
bundler config (system.js, webpack, requirejs - whichever you've used)
That being said, this does not necessarily mean that your dependencies have also remained stable in those past three years. Especially in Javascript world. To accommodate for this, I would suggest:
Create a blank, new project with the latest Aurelia CLI
Copy/paste over the /src folder from your old project to your new one
Take in consideration specifics, like package.json from your old project and migrate them by hand (reinstalling) in your new project
Again, try to keep your bundler similar and you will have relatively little changes. But if you choose you want to migrate from System.Js to Webpack, it'll be a bit more hassle. But arguably, rewarding in the end if your project needs to be kept alive for a longer while.
Considering the age of your old project, restarting with a clean setup and config is what I would consider to be "the best way" to retouch only the necessities.

Androidx and gradle feature errors after running update

I returned to a react native project after about a month or two and updated the packages along with all the packaged. However, it seems that in the time since I worked on it there have been some major changes which is now preventing react-native run-android from completing and results in a list of errors which seem related to the camera module, gradle and androidx.
Apologies, I could not paste the error in the post as it exceeds the character limit.
https://hatebin.com/bvsjcldeby
After initializing a new project all seems well so it appears to be something wrong with the configuration of the project itself.
Any help is really appreciated. Thanks in advance.
Google moves from the Support Library to the AndroiX library. So the first one is deprecated.
RN 0.60.X migrates to AndroidX ans so should each of the dependencies that you use. 0.60.X is a major breaking change and the way to solve it could be very wide. You would need to check each of your modules or dependencies that you use and find if they upgrades to use AndroidX. There is also a workaround where you could use Jetifier, which is a tool that will migrate old dependencies to the new AndroidX imports however I found it a little buggy dependening on your project.
My 2 cents right now would be to go to 0.59.8 until all major dependencies have time to upgrade and release their updated versions. Otherwise I think it is too much work right now.
You can see more here: https://facebook.github.io/react-native/blog/2019/07/03/version-60

how to add latest webrtc sources to android project?

So, there is existing webrtc project, that runs on latest libjingle(25dec 2015). And now, for support purpose, I need to update current version to latest from webrtc repo. How can I do that? I see there java files with c++ with headers in separate folders, have no idea what is going on there, even where files that I actually need, and how to implement that source to project. Is there any in-depth guide for that? Have anyone faced this problem before?
WebRTC's project structure have changed a lot since last year. They are deprecating GYP in favor of GN, it is highly recommended to start from the beginning.
You can read the compilation guide for Android there: https://webrtc.org/native-code/android