-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
ReferenceError: Property 'Proxy' doesn't exist, js engine: hermes [Mon Feb 08 2021 19:21:54.427] ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication), js engine: hermes #13
Comments
Please follow the installation instructions entirely. If you have, then you must be facing an issue with Reanimated: software-mansion/react-native-reanimated#1439 I'm closing this since it's reanimated specific and not reproducible. |
i followed the all instruction... i have installed reanimated 2 properly run a example and it works..can you make a example repo of moti so we can play around |
Please make an empty expo project to try to reproduce it. I've tested this successfully on web and native with There's also an examples folder on this repo. This looks like a reanimated problem, but see if you can recreate it in an empty project. |
am getting the same error, the app is created with react native cli and followed all the instruction for installing react native reanimated 2, it only breaks when i import {View,...} from 'moti' environment |
What happens if you try with Expo? It works fine on Expo for me, so it seems like a Reanimated issue. |
it only gives me the error when I import moti components..I have run reanimated animation it works fine! |
same dude |
Without a reproducible example, I don't really know what I can do. |
There are 2 examples in the https://github.com/nandorojo/moti/tree/master/examples |
if you get time can u make a example with react native cli so we can use this library in production apps.. I tried two new app same error |
Can you upload those examples to a reproducible GitHub repo? |
@cmaycumber have you used a react native CLI example in a monorepo before? I wonder if the setup would be similar to the expo one. |
here is the repo .. i Have installed moti in the reanimated playground repo |
Is this on android? |
yes pixel 2! |
Got it, could you try running this repo's examples on android and see what happens? I haven't tested on android. |
Can you try moti's example? Just clone this repo, run |
oh your expo example works fine i had cloned it and run it..it works |
Not specifically. I have set up a monorepo outside of the expo managed workflow in the past and it was more difficult to get working. Most of the issues I ran into was related to the file paths that are default for a react-native project. |
it works fine with expo |
I can try to make a react native CLI project when I have time, but if someone else could try debugging by commenting out different parts of the code until it works that would be useful. I don't use react native CLI. Just look in |
there is no file named that..there is use-map-animate-to-style.ts |
Oh sorry typo, that's what I meant. |
ok i will try what u asked |
That's right! I would try commenting out everything inside of it (but still return an object), and putting console logs throughout, until you can find the line that breaks it. |
got a new kind of error..i tried to run Animated Presence error...and i have returned only obj still same error..might be some other library causing it ReferenceError: Property 'Proxy' doesn't exist, js engine: hermes |
This all looks like it's related to Hermès/reanimated |
Any update? did you try it on bare rn cli? |
It would appear that Framer Motion uses I might have to disable I wrote more here: software-mansion/react-native-reanimated#1711 |
I'm not using Hermes yet so I can't test this, and I don't have an Android. Could you guys please try importing this library's polyfill at the root of your app before importing Moti and see if it fixes it? |
Ok it's midnight here i will try it out tomorrow and let you know...just have to import this index.js right? Or wrap it like Navigation Container? |
I would think so, yes. |
i am also facing the same error for last 2 days in react native cli! |
Can you try the solution I proposed then? |
I tried it. Doesn't work. |
Hmm okay, good to know. I propose this:
If there's no luck, I'll have to disable the AnimatedPresence feature for apps using Hermès. |
Here is a conversation about Proxy in Hermès: facebook/hermes#33 Please read through and see if you can try anything that might solve this. Thanks! |
Possible solution: upgrade to RN 64 and Hermès v0.7: facebook/hermes#33 (comment) More info: facebook/hermes#33 (comment) Or, try The Hermès repo has what appears to be solutions. Unfortunately I don't have an android so I can't test this out. I would really appreciate if everyone who has commented would help investigate and trying the solutions above so we can get to the bottom of it. Thanks! Update, here is a relevant release for a potential fix where Hermes adds support for Proxy: https://github.com/facebook/hermes/releases/tag/v0.5.2-rc1 |
^^That did the trick for me. Thanks for the speedy workaround @nandorojo :) |
Awesome! I'll add it to the docs and then close this. |
Solution added to docs: https://moti-5qbvkhyh8.vercel.app/installation#hermesandroid-support |
when i import {View as MotiView} from 'moti';
i get this error only then.
"@react-native-community/masked-view": "^0.1.10",
"@react-navigation/native": "^5.9.2",
"@react-navigation/stack": "^5.14.2",
"moti": "^0.4.1",
"react": "16.13.1",
"react-native": "0.63.4",
"react-native-bootsplash": "^3.1.3",
"react-native-gesture-handler": "^1.9.0",
"react-native-reanimated": "2.0.0-rc.0",
"react-native-safe-area-context": "^3.1.9",
"react-native-screens": "^2.17.1"
The text was updated successfully, but these errors were encountered: