Comments (9)
created the bug report: software-mansion/react-native-reanimated#5311
from rnx-kit.
We'd really appreciate it if you can make a minimal repro.
from rnx-kit.
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.
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.
What version of @react-navigation/drawer
are you using @adamivancza? Try 6.5.1
from rnx-kit.
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.
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.
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:
from rnx-kit.
I'm gonna close this one and open a bug report inside react-native-reanimated
from rnx-kit.
Related Issues (20)
- @rnx-kit/react-native-auth causes yarn android to fail. HOT 4
- react-native-host: add Windows support
- react-native-host: add macOS support
- create an RFC to discuss the idea of RN based WebAPIs HOT 1
- make a working prototype of a WebAPI to pair with the RFC
- figure out a prioritised list of WebAPIs to work on first post-RFC HOT 3
- improve the rnx-kit CLI generator to have a scope for webapis new packages
- Suggestion: Flag unused imports after inlining platform checks
- Dependency Manager Customizations HOT 1
- Error: Unable to resolve module ./ on bun + babel-plugin-module-resolver + metro-resolver-symlinks HOT 1
- New @rnx-kit/align-deps profil for [email protected]
- 404 Not Found when running npx rnx-align-deps HOT 1
- Enable pnpm mode to catch issues earlier
- build faild: No matching export in for import HOT 6
- `bundleRoot` ignored on apple HOT 1
- react-native-host does not render when new arch is enabled HOT 2
- align-deps: add support for grouping log lines on CI
- Importing files outside root directory while using metro-plugin-typescript HOT 10
- align-deps: new flag to not throw an error for exact dependencies that are within bounds HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rnx-kit.