ERROR Invariant Violation: ViewPropTypes has been removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.

This issue has been created since 2022-09-14.

Description

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

Screenshot 2022-09-14 at 15 44 20

danilobuerger wrote this answer on 2022-09-14

If you share a reproducible repository, I would take a look.

Almas-Asghar-730 wrote this answer on 2022-09-18

Invariant Violation: ViewPropTypes has been removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.
having the same issue is their any solution?

Bayramito wrote this answer on 2022-09-18

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 from react-native still keep crashing and need to be patched one by one.

HSReact wrote this answer on 2022-09-19

Have the same problem

alexkendall wrote this answer on 2022-09-20

Same problem. Swapped deprecated-react-native-prop-types in my code and can't find ViewPropTypes anywhere in the project.

More Details About Repo
Owner Name facebook
Repo Name react-native
Full Name facebook/react-native
Language JavaScript
Created Date 2015-01-09
Updated Date 2022-10-07
Star Count 105180
Watcher Count 3671
Fork Count 22481
Issue Count 2230

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
PROD ISSUE - Parser is incorrectly categorizing value as geolocation unit 1 2022-06-11 2022-07-25
/atem/usk/1 are not in my list of available OSC adresses 2 2019-12-18 2022-09-25
[Minor Enhancement]: Relabel 'Apply' to 'Restore' in the backups list 0 2022-09-12 2022-10-03
[Bug]: Listening statistics are not being captured correctly 0 2022-09-13 2022-09-13
Saving each time step flow field values 3 2021-11-11 2022-08-22
Check if restriction to single argument reduction is still required 0 2022-06-20 2022-09-16
`GetOrAdd` should automatically add the relevant meshblock data 0 2022-08-16 2022-09-16
劾『简书』之蛮横无道 | 晚晴幽草轩 3 2018-07-17 2021-12-25
Create list of potential fields for the editor. 1 2021-11-16 2022-08-01
Change email address 1 2021-11-23 2022-08-27
F-Droid build failed 6 2021-08-31 2022-09-15
Symantec (Broadcom) DLP - incorrect sourcetype 3 2022-06-23 2022-09-27
splunk_sc4s_fallback in wrong index 1 2022-06-27 2022-08-20
Add license automated check using SymbiFlow/actions/[email protected] GitHub Action 1 2020-04-22 2022-08-01
Slice editor has issues with stored queries 0 2022-01-16 2022-09-14
Having issue while compression 1 2022-04-23 2022-09-25
Add Discord button to README 1 2021-05-15 2022-09-21
new plugin: absolute gang 10 2022-01-17 2022-09-27
CVE-2022-23181 (High) detected in tomcat-embed-core-9.0.56.jar - autoclosed 1 2022-05-12 2022-09-11
H2 Database is vulnerable to RCE. 4 2022-02-28 2022-09-14
[upload] Support multiple repository targets in Artifactory 0 2021-12-09 2022-08-30
Bug: "The eqMac Audio Driver is not installed" window pops up 3 2022-01-16 2022-10-06
"error": "Server Error (500)" 4 2022-09-13 2022-09-25
Batch scanning 6 2021-05-07 2022-01-14
Ammonite-style imports can trigger unused import warnings even when used 1 2021-09-05 2022-08-04
Image block: uploading an image replacement flashes old image before replacement 0 2021-11-12 2022-01-06
Question about next version of the plugin (> 1.3.3) 1 2022-02-17 2022-10-01
building on Windows with Clang linker error: undefined symbol: __declspec(dllimport)... 3 2020-10-31 2022-09-27
Build failed with JNI layer for Android: '__GNUC_PREREQ' is not defined 12 2021-01-24 2022-09-27
Login Reminder: send scheduled local notifications for people with issues logging in 2 2022-07-21 2022-07-27
[issue] Unable to download/update templates 5 2021-10-18 2022-08-28
Can't upgrade from v7 to v8 directly? 2 2021-01-20 2022-09-03
Still having issues with "Unsupported" things 4 2022-09-22 2022-09-30
Email erroneously bouncing with "multiple To: headers" 4 2021-08-18 2022-09-22
GCP janitor: support filtering by labels 4 2021-05-25 2022-10-04
Enable feature flag disabled error reporting for MachinePool, ClusterResourceSet 3 2022-03-24 2022-09-26
[Auto Generated Report]java.io.FileNotFoundException: F 3 2021-02-26 2022-09-26
Remove yarn workspaces cache feature flag 1 2021-04-29 2022-10-02
Need to update versions 5 2021-02-03 2022-09-29
[MNT]: flake8 check duplicated in CI 1 2022-07-12 2022-10-01
Add support for cross cluster search with PPL 1 2021-09-29 2022-08-07
Bump moment from 2.29.0 to 2.29.1 0 2020-10-11 2022-09-22
error in flake8-import-order setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; slice indices must be integers or None or have an __index__ method 1 2022-03-24 2022-09-26
Intermittent Issues in using polyglot with reflection 0 2022-06-08 2022-10-07
many errors in npm install 3 2019-07-05 2022-09-30
新的项目地址KeepSQLAdvisor 0 2019-01-13 2022-09-29
What is the range of pitch correlation when lowering the temperature 2 2020-05-06 2022-07-25
podman does not detect systemd entrypoints when prefixed with /bin/sh 10 2022-02-23 2022-09-22
checkboxes are not rendered in data.html.twig email body when used in fieldsets 3 2018-06-06 2022-09-11
Why exclude resources with errors in the calculation? These errors do not necessarily affect all evaluators 1 2022-06-24 2022-09-25