Skip to content

fix the error about Invariant Violation: ViewPropTypes has been removed from React Native #63

@fencer-yd

Description

@fencer-yd

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch react-native-neomorph-shadows@1.1.2 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-neomorph-shadows/package.json.orig b/node_modules/react-native-neomorph-shadows/package.json.orig
new file mode 100644
index 0000000..fc5e8ff
--- /dev/null
+++ b/node_modules/react-native-neomorph-shadows/package.json.orig
@@ -0,0 +1,53 @@
+{
+  "name": "react-native-neomorph-shadows",
+  "version": "1.1.2",
+  "description": "Shadows and neumorphism/neomorphism UI for iOS & Android (like iOS).",
+  "main": "index.js",
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "dependencies": {
+    "@react-native-community/art": "^1.2.0",
+    "prop-types": "^15.7.2"
+  },
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/tokkozhin/react-native-neomorph-shadows.git"
+  },
+  "keywords": [
+    "react-native",
+    "react-component",
+    "react-native-component",
+    "react",
+    "react native",
+    "mobile",
+    "ios",
+    "android",
+    "ui",
+    "component",
+    "neomorph",
+    "neomorphism",
+    "neumorphism",
+    "skeuomorphic",
+    "skeuomorphism",
+    "shadowbox",
+    "shadow",
+    "shadow-view",
+    "shadowview",
+    "react-native-shadow",
+    "react-native-shadow-view",
+    "react-native-shadowview",
+    "react-native-neomorphism",
+    "react-native-neomorphism-view"
+  ],
+  "author": "Daniel Tokkozhin",
+  "license": "MIT",
+  "bugs": {
+    "url": "https://github.com/tokkozhin/react-native-neomorph-shadows/issues"
+  },
+  "homepage": "https://github.com/tokkozhin/react-native-neomorph-shadows#readme",
+  "devDependencies": {
+    "@types/react": "^16.9.34",
+    "@types/react-native": "^0.62.7"
+  }
+}
diff --git a/node_modules/react-native-neomorph-shadows/src/types.js b/node_modules/react-native-neomorph-shadows/src/types.js
index a2098cc..adc0734 100644
--- a/node_modules/react-native-neomorph-shadows/src/types.js
+++ b/node_modules/react-native-neomorph-shadows/src/types.js
@@ -1,4 +1,4 @@
-import { ViewPropTypes } from 'react-native';
+import { ViewPropTypes } from 'deprecated-react-native-prop-types';
 import { number, shape, string, node, bool } from 'prop-types';
 
 export const ShadowARTType = {

This issue body was partially generated by patch-package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions