ERROR Invariant Violation: ViewPropTypes has been removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.
See original GitHub issueDescription
I have searched the whole repository. But I couldn’t find ViewPropTypes anywhere in the project.
// Deprecated Prop Types
get ColorPropType(): $FlowFixMe {
invariant(
false,
'ColorPropType has been removed from React Native. Migrate to ' +
"ColorPropType exported from 'deprecated-react-native-prop-types'.",
);
},
get EdgeInsetsPropType(): $FlowFixMe {
invariant(
false,
'EdgeInsetsPropType has been removed from React Native. Migrate to ' +
"EdgeInsetsPropType exported from 'deprecated-react-native-prop-types'.",
);
},
get PointPropType(): $FlowFixMe {
invariant(
false,
'PointPropType has been removed from React Native. Migrate to ' +
"PointPropType exported from 'deprecated-react-native-prop-types'.",
);
},
get ViewPropTypes(): $FlowFixMe {
invariant(
false,
'ViewPropTypes has been removed from React Native. Migrate to ' +
"ViewPropTypes exported from 'deprecated-react-native-prop-types'.",
);
},
Use this in node_modules -> react-native -> index.js
Version
0.70
Output of npx react-native info
System: OS: macOS 12.2.1 CPU: (8) arm64 Apple M1 Pro Memory: 95.16 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 18.4.0 - /opt/homebrew/bin/node Yarn: 1.22.18 - /usr/local/bin/yarn npm: 8.12.1 - /opt/homebrew/bin/npm Watchman: 2022.06.06.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: Not Found IDEs: Android Studio: 2021.1 AI-211.7628.21.2111.8309675 Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild Languages: Java: 11.0.15 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.2.0 => 18.2.0 react-native: 0.70.0 => 0.70.0 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Steps to reproduce
When building the project
Snack, code example, screenshot, or link to a repository
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
i actually applied the solution by adding
deprecated-react-native-prop-types
to the app but somehow external modules did not get effected from that. so result is, every external lib which used ViewPropTypes fromreact-native
still keep crashing and need to be patched one by one.Same problem. Swapped deprecated-react-native-prop-types in my code and can’t find ViewPropTypes anywhere in the project.