charliesbot / react-native-media-controls

A sweet UI component to manipulate your media. Strongly typed.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ViewPropTypes has been removed from React Native.

UmarFarooqCA opened this issue · comments

I got error after installing the package in my application.

ERROR Invariant Violation: ViewPropTypes has been removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'. ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). 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. ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). 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.

I'm not using ViewPropTypes anywhere in my application. this error only show after installing the yarn add react-native-media-controls react-native-slider command

  • "react": "18.0.0"
  • "react-native": "0.69.5"

faced the same issue ,the package relies on react-native-slider which uses the removed ViewPropTypes ,
install @react-native-community/slider instead of "react-native-slider"

run your project ,the console will point you to where the errors occur
,change all the import and require statement from ""react-native-slider" to "@react-native-community/slider"

THIS IS NOT A GOOD FIX!
feel free to submit a pull request