I am using react native expo's latest SDK. While using the react-native-in-app-notification
package I am getting the following error,
ERROR TypeError: undefined is not an object (evaluating '_reactNative.Image.propTypes.source')
ERROR Invariant Violation: Failed to call into JavaScript module method AppRegistry.unmountApplicationComponentAtRootTag(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter.
A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an e ERROR Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered
callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerform A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
Please help me...
proptTypes
is removed from react-native
, which results unmaintained packages having these issues. You can either fork that repo then apply changes & use your forked repo or follow below method to patch-package
with fixes in package.
node_modules/react-native-in-app-notification
npm i patch-package
( patch-package )npx patch-package react-native-in-app-notification
(This will create a patch file with changes in node_modules file of your package)"postinstall": "patch-package"
under scripts
in package.json
to automatically run patch-package
and apply changes after npm install
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.