Giter Club home page Giter Club logo

Comments (9)

adamivancza avatar adamivancza commented on June 3, 2024 4

created the bug report: software-mansion/react-native-reanimated#5311

from rnx-kit.

tido64 avatar tido64 commented on June 3, 2024 1

We'd really appreciate it if you can make a minimal repro.

from rnx-kit.

adamivancza avatar adamivancza commented on June 3, 2024

I did some further digging into this - seems like it is related to @react-navigation/drawer. When I stripped out the Drawer navigator from our app it is not crashing anymore. I assume they use a condition somewhere in their code which the treeShaking ignores and strips out something that it actually needs from reanimated.
https://reactnavigation.org/docs/upgrading-from-5.x/#drawer-now-uses-reanimated-2-if-available

but still working on the repro project

from rnx-kit.

tido64 avatar tido64 commented on June 3, 2024

When I stripped out the Drawer navigator from our app it is not crashing anymore. I assume they use a condition somewhere in their code which the treeShaking ignores and strips out something that it actually needs from reanimated.

It sounds like @react-navigation/drawer or one of its dependencies are declaring sideEffects: false when they shouldn't. You can try removing the line in package.json to see if it fixes the crash.

from rnx-kit.

BrentonWheeler avatar BrentonWheeler commented on June 3, 2024

What version of @react-navigation/drawer are you using @adamivancza? Try 6.5.1

from rnx-kit.

adamivancza avatar adamivancza commented on June 3, 2024

Oh, I think I found the reason - https://github.com/software-mansion/react-native-reanimated/blob/main/package.json
this has some sideEffects here which I assume is web only (based on git blame) so treeshaking excludes some stuff for the app that we would need. after changing that to plain true our app works just fine. Not entirely sure how to proceed after this though. I can't patch package.json via patch-package...

from rnx-kit.

tido64 avatar tido64 commented on June 3, 2024

Oh, I think I found the reason - https://github.com/software-mansion/react-native-reanimated/blob/main/package.json this has some sideEffects here which I assume is web only (based on git blame) so treeshaking excludes some stuff for the app that we would need.

Two things come to mind:

  • Are the files listed in sideEffects missing in the bundle i.e. is this a bug in our serializer?
  • If not, should that list include more files? If the sideEffects array is missing files, we should fix that upstream.

from rnx-kit.

adamivancza avatar adamivancza commented on June 3, 2024

Oh, I think I found the reason - https://github.com/software-mansion/react-native-reanimated/blob/main/package.json this has some sideEffects here which I assume is web only (based on git blame) so treeshaking excludes some stuff for the app that we would need.

Two things come to mind:

  • Are the files listed in sideEffects missing in the bundle i.e. is this a bug in our serializer?
  • If not, should that list include more files? If the sideEffects array is missing files, we should fix that upstream.

The sideEffects seems to be completely wrong for react-native as after installing this lib I do not have the listed libraries at all:
Screenshot 2023-10-26 at 21 21 23

from rnx-kit.

adamivancza avatar adamivancza commented on June 3, 2024

I'm gonna close this one and open a bug report inside react-native-reanimated

from rnx-kit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.