You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This package works great and thanks a lot for that!
The problem I have is when I try to run tests with Jest on my code. When I run the tests, I get the following error message:
Invariant Violation: Native module cannot be null.
at invariant (node_modules\fbjs\lib\invariant.js:38:15)
at new NativeEventEmitter (node_modules\react-native\Libraries\EventEmitter\NativeEventEmitter.js:32:1)
at Object.<anonymous> (node_modules\@remobile\react-native-file-transfer\libs\FileTransfer.js:29:63)
at Object.<anonymous> (node_modules\@remobile\react-native-file-transfer\index.js:2:20)
The line in my code that is the culprit is: import FileTransfer from '@remobile/react-native-file-transfer'
I've tried mocking the the module with Jest, but this does not fix the error.
The problem is caused by line 29 in FileTransfer.js: var EventEmitter = Platform.OS==="android"?DeviceEventEmitter:new NativeEventEmitter(NativeModules.FileTransfer);
Can anyone help me with this error?
Thanks.
The text was updated successfully, but these errors were encountered:
This package works great and thanks a lot for that!
The problem I have is when I try to run tests with Jest on my code. When I run the tests, I get the following error message:
The line in my code that is the culprit is:
import FileTransfer from '@remobile/react-native-file-transfer'
I've tried mocking the the module with Jest, but this does not fix the error.
The problem is caused by line 29 in FileTransfer.js:
var EventEmitter = Platform.OS==="android"?DeviceEventEmitter:new NativeEventEmitter(NativeModules.FileTransfer);
Can anyone help me with this error?
Thanks.
The text was updated successfully, but these errors were encountered: