question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
Bayramitocommented, Sep 16, 2022

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.

1reaction
alexkendallcommented, Sep 20, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

ViewPropTypes will be removed from React Native. Migrate to ...
ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.
Read more >
ViewPropTypes will be removed from React ... - Stack Overflow
ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types · Solution:.
Read more >
viewproptypes has been removed from react native. migrate to ...
Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'. ERROR Invariant Violation: Module AppRegistry is not a registered callable module ( ...
Read more >
viewproptypes will be removed from react ... - Code Grepper
Invariant Violation : ViewPropTypes has been removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'. Comment.
Read more >
@pushprotocol/reactnative - Developers
Invariant Violation : ViewPropTypes has been removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found