NativeAnimatedModule causes "Invariant Violation: new NativeEventEmitter()
requires a non-null argument."
#2301
Labels
new NativeEventEmitter()
requires a non-null argument."
#2301
Environment
Steps to reproduce the bug
Additional context
I'm coming from v0.75.9 (it is working fine in that version) and this can be reproduced with v0.76.0 as well.
Now I'm using v0.76.2 although there is an issue with an unavailable package (see issue #2282). I'm bypassing this issue with this overwrite:
I already did a bit of digging by adding console logs to the constructors in the node_modules and noticed that the native module that is null is
NativeAnimatedModule
. This can be nailed down to line 433 innode_modules/react-native-macos/src/private/animated/NativeAnimatedHelper.js
:Removing the if/else statement and always returning
NativeAnimatedModule
fixes the issue.It also seems like this file is not present in v0.75.9.
Is this fix maybe already a solution that I can use until the actual fix is released?
I also had issues with the
Picker
component from@react-native-picker/picker
before. It was used in a.windows.tsx
and was causing an error because of a missing macOS version (which it doesn't need, because it is only used in a.windows
file and not anywhere else).Maybe this is related to this issue, probably not though.
The text was updated successfully, but these errors were encountered: