Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
fencer-yd opened this issue Aug 25, 2022 · 4 comments

Comments

@fencer-yd
Copy link

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] 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.

@JapeshFlyFin
Copy link

JapeshFlyFin commented Jan 7, 2023

I'm facing same issue, is there any plan to implement this fix?

@VishalRowth
Copy link

same
Soution Please?

@mbpictures
Copy link

@VishalRowth the last version has been published 3 years ago. The solution to fix it is provided in the issue description. Install patch-package, modify the files as described above (node_modules/react-native-neomorph-shadows/src/types.js), and run patch-package to patch the react-native-neomorph-shadows package.

@sam-uraii
Copy link

Thanks a lot!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants