![](/img/trans.png)
[英]React Native, undefined is not an object (evaluating ‘_reactNative.Image.propTypes.resizeMode’)
[英]react-native-in-app-notification ERROR TypeError: undefined is not an object (evaluating '_reactNative.Image.propTypes.source')
我正在使用 React Native Expo 的最新版本 SDK。在使用react-native-in-app-notification
package 时,出现以下错误,
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.
请帮我...
proptTypes
已从react-native
中删除,这导致未维护的包出现这些问题。 您可以分叉该回购然后应用更改并使用您的分叉回购或按照以下方法在 package 中修复patch-package
。
node_modules/react-native-in-app-notification
npm i patch-package
( patch-package )npx patch-package react-native-in-app-notification
(这将创建一个补丁文件,其中包含包的 node_modules 文件中的更改)scripts
下添加"postinstall": "patch-package"
以在package.json
npm install
后自动运行patch-package
并应用更改
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.