react-native-onyx icon indicating copy to clipboard operation
react-native-onyx copied to clipboard

Using onyx in an app that doesn't use lodash by itself fails

Open hannojg opened this issue 1 year ago • 1 comments

When trying to use onyx in a blank new app you get failures like these:

CleanShot 2024-11-07 at 07 43 49

I think the main problem / reason for that is that onyx uses these dependencies but doesn't list them as dependency:

https://github.com/Expensify/react-native-onyx/blob/d0cacbff3cc850b64ab235d2b4e2ca6be043f9bd/package.json#L41-L45

I guess that has been unnoticed as the NewDot app ships with lodash, thus those imports can resolve. I am currently trying to test / use onyx in a separate context than NewDot and this prevents me from using it (will put up a PR in a moment).

hannojg avatar Nov 07 '24 07:11 hannojg

@hannojg I am having the same issue you mentioned. How can I fix it?

etCoderDysto avatar Sep 17 '25 13:09 etCoderDysto