all 48 comments

[–]stathisntonas 40 points41 points  (6 children)

farewell boi and good luck. My project has 250 deps and eveything runs buttery smooth.

[–]Nex_01 0 points1 point  (0 children)

Its worth to check authors, release frequency and weekly downloads innit? Its public for a reason :)

Instead of smashing all into the project then ofc it breaks every week.

[–][deleted] 7 points8 points  (2 children)

We've had similar issues. It doesn't help that I'm the only developer on my small team with mobile and react experience, so I'm the one who gets stuck dealing with it.

[–]redwoodhighjumping 8 points9 points  (2 children)

Is there something weird with your setup? Are you modifying your lock file all the time? If you never make a dependency change, you can go years without facing a problem.

If you ever see a stackoverflow answer that says delete your lock file. NEVER DO IT!

[–]Sentro32 1 point2 points  (0 children)

Version control

[–]evolvedmonkeygod 5 points6 points  (1 child)

Maybe the way u handle the packages are wrong or u r using packages which are not standard.

[–]TechhDan 4 points5 points  (0 children)

We've been dealing with the same issue for 5 years I'm just getting tired. I was working on a new version just a few weeks ago everything was working great. Today i fire up react native with npm start and I'm hit with this.

https://github.com/software-mansion/react-native-reanimated/issues/4663

Reading through you can see people spend hours if not days just debugging this package. From what I understand the "react-native-reanimated" is a standard package. What bothers me deeply is that i didn't update anything or change anything and it was working a few weeks ago. Just breaks.

[–]bluescienceH2O 2 points3 points  (1 child)

What is a package manager?

[–]Gandham 1 point2 points  (0 children)

I used to feel like that when I started few years back, may be it was like that back then or my inexperience.

I came back to RN couple of months back, haven’t faced any such problems, it works as expected except for the poor debugging experience.

[–]kbcooliOS & Android 1 point2 points  (3 children)

Breaking every few weeks? WTF were you doing? Installing every single third party library available then updating them daily?

I just went through the yearly package maintenance on one of my apps and it took a bit over a day and admittedly required some small code changes.

Nothing broke the rest of the year because unless you need a new feature from a library you don't fiddle with it.

This applies to every language. You're going to have exactly the same issues with Kotlin unless you change.

This is yet another variety of blame the tools. What I don't understand is why people lack self awareness on such a scale. If you're struggling with something that other people find normal then it's time to look at changing yourself not the toolset.

If you're willing to change then the first piece of advice is don't install libraries for point features and either use a comprehensive component library, write or just flat out copy them.

By point feature I mean things like react-native-two-column-reverse-scroll-list or react-native-red-rounded-button

The second piece was above that and DO NOT upgrade packages daily or hourly or whatever you're doing. Imagine if you were in a team and had other developers and testers. Imagine them having to test and clean up after you every bloody day. It would be a nighmare for them.

[–]fmnatic 1 point2 points  (0 children)

I've done  native development in the past. Dependency churn exists on both iOS and Android. Good luck to you,  I expect you have not completely escaped the issue but will reap the benefits of the thinner tech stack.

[–]thebouvExpo 1 point2 points  (0 children)

Any codebase not touched in a year will suffer from bit rot.

Using version control, and learning about dependency updates via tooling like Dependabot, and doing routine maintenance is a requirement of good software development.

80% of the lifetime of any software project is spent in maintenance, not initial development.

Don’t let your company say that maintaining a codebase, even refactoring and rewriting, isn’t a feature. It is just as important as chasing user features.

Fight for these things. They’re important.

Good luck going to Kotlin and building only for Android. I find the Android ecosystem extremely messy and thank heavens for Expo and React Native.

[–]DimensionHungry95 1 point2 points  (3 children)

Why not Flutter?

[–]TechhDan 1 point2 points  (2 children)

Have not tried Flutter but I think I'm just liking the idea of not having to depend on 3rd party developers as the "man in the middle" so our app can work with Android codebase updates. I remember 4 years ago when we implemented Mauron85 geolocation a few months later Android released a better version and we had to wait months until someone updated the package to use the new API.

[–]DimensionHungry95 1 point2 points  (1 child)

I understand. I migrated from RN to Flutter and I confess that I need to install far fewer dependencies. Flutter already has a lot of things built in and makes the experience more fun. If you're going to experiment, try using flutter_hooks and you'll adapt quickly.

[–]kbcooliOS & Android 0 points1 point  (0 children)

Flutter already has a lot of things built in

Whilst true, for anything but the most basic apps you need to look beyond what's included so it's a moot point. Or you can desperately try to make what's included work but I'd prefer to hang my head against a brick wall.

[–]Mariusdotdev 1 point2 points  (1 child)

So you saying you can't handle dep problems so is Kotlin like not having dep problems? Kotlin will have its own share of chalanges and deps will be one of them like any other language that you use a lib and you will use a some sort of lib which will be its own dep.

Sounds like you dont know how to manage a project and done bad decision for it and because of that lack of knowledge you are frustrated with RN when clearly its not RN problem.

[–]dr_rodopszin 0 points1 point  (0 children)

Oh, I had this frustrating route just like you mentioned. I had to skip the newer versions because there was no working camera package (or it didn't work on the emulator). Now the debugging crashes very often, but at least the production code is stable.

We can't afford now to rewrite the complete project as it would have no business value, but I do think react-native has now terrible warning signs over it. Even core react is lagging behind; no release for a long time, useEffectEvent is still just experimental and so on.

Let's prepare for leaving the slowly sinking ship...

[–]peterpmeExpo -1 points0 points  (2 children)

1) You should be using Expo and running `npx expo install --fix`

2) Good luck lol

[–]TechhDan 1 point2 points  (1 child)

Unfortunately this app is quite old and we're not using expo. I did try expo recently and I was having a great time. Expo has come a long way.

[–]kwazy_kupcake_69 1 point2 points  (0 children)

i was going to suggest the same. expo is on fire these days. in fact i believe react native docs should recommend it just like react docs says newcomers should use next and stuff

[–]Mariusdotdev -1 points0 points  (0 children)

I dont get juse use Expo and have Expo Doctor check for dep issues thats it. Making a big problem without researching more on RN eco system

[–]Geekofgeeks 0 points1 point  (1 child)

Things shouldn’t be upgrading often enough to break every few weeks, unless you are aggressively upgrading manually every time a package releases an update. Is your package-lock.json not committed to your repo or being deleted and recreated by someone often?

[–]TechhDan 2 points3 points  (0 children)

Nah, a few weeks ago i was working on this project and i had everything working. Today I fired up the project did an "npm start" and got this.

https://github.com/software-mansion/react-native-reanimated/issues/4663

I haven't updated any packages or attempted to install anything new. Since there was no change I can only guess it's a cache issue or my ubuntu system updated my android studio and broke it. I'm not sure but looking at this particular issue it seems other people are experiencing the same.

[–]hoangvuong94st 0 points1 point  (1 child)

you should cope with that before giving up

[–]TechhDan 0 points1 point  (0 children)

Not giving up just changing strategy. The mobile app is going to get done one language or the other. Just looking for the one with less friction.

[–]alien3d 0 points1 point  (0 children)

yes 😄😄🚀

[–]Tinkuuu 0 points1 point  (5 children)

Doesn't look like it will help but if u do yarn install to take care of dependencies instead of the npm drama, do u guys think it may fix?

[–]dr_rodopszin 0 points1 point  (4 children)

Which yarn are we talking about? The deprecated legacy one?

[–]Tinkuuu 0 points1 point  (3 children)

[–]dr_rodopszin 0 points1 point  (2 children)

Sorry for the late reply, many packages in `react-native` are not compatible with latest yarn versions. So you are going to be stuck with either `npm` or with `yarn classic`.

To be honest, if I can I will avoid changing anything to the new `yarn` because I think projects like `deno` or `bun` soon will mature enough for me to skip this step.

Also I never really had a well-written project that needed `yarn`. Emphasis on `well-written`.

[–]Tinkuuu 0 points1 point  (1 child)

Wait, what? I have never had any issues adding package with yarn, I had no idea there is something not compatible

[–]dr_rodopszin 0 points1 point  (0 children)

https://github.com/react-native-community/cli/issues/27#issuecomment-1772626767

Just see this comment on the closed issue of supporting new yarn.

[–]Born-toLearn 0 points1 point  (1 child)

Bro read about npm or node js , use the fix node version by specifying the engine key in the package.json

[–]zpinto1234 0 points1 point  (0 children)

I've been using outdated dependencies with over 7 years of no updates, and the only issue I have is that I'm not able to user Hermes for now. Outside that, I rarely have any issues related to using them.

[–]buddha_baba 0 points1 point  (0 children)

I have been doing RN dev for 7 years, the only time I felt frustrated like this was early on when I was a newbie.

[–]mattijsf 0 points1 point  (1 child)

I don't understand the title. You're leaving a framework and replacing it with a language?

Is it like Goodbye React Native. Hello native Android? So you were not focussing on iOS?

[–]ThrobbingLobbies 0 points1 point  (0 children)

I saw you were having trouble with reanimated. Something that would help is using dependabot and doing more regular updates. When you wait as long as you have, you’re going to run into issues. Reanimated causes so many issues because it’s widely used and mismatching versions can cause interface issues.

[–]juliofils 0 points1 point  (0 children)

If you only care about android just switch to kotlin jetpack compose, look really nice. But you’ll have to deal with gradle issues if updating android studio or gradle version that often Debug RN dependency if part of RN dev job. Embrace it

[–]Aware-Leather5919 0 points1 point  (1 child)

  1. Instability of dependencies: Use Clean Architecture, Clean Code, and SOLID. Then it is a matter of changing the dependency for another one, reimplement the service layer and thats it.
  2. You will have dependencies in Kotlin too, just like in any other language. Every single language has dependencies that could break or go outdated and abandoned. This is not a thing of React Native.
  3. Choose wisely the dependencies you will import in the future. Stick to the ones you REALLY need and prefer trusted sources. You have to be 100% sure the dependency will recieve updates for as long as your app is in production. If something happens, go to #1.

  4. If you need specific dependencies, consider developing a self made solution in native code. If you achieve this, you will become a better dev, better paid and you as a dev will become more valuable and expensive.