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.

ReferenceError: Property 'Proxy' doesn't exist, js engine: hermes

See original GitHub issue

Description

i was trying to play with moti… when i import moti the app gives me this error.It only gives me this error when i use moti…i had opened issue there he said its related to reanimted.

Steps To Reproduce

import React, { useReducer } from 'react'
import { StyleSheet, Pressable } from 'react-native'
import { View } from 'moti'

function Shape() {
  return (
    <View
      from={{
        opacity: 0,
        scale: 0.5,
      }}
      animate={{
        opacity: 1,
        scale: 1,
      }}
      transition={{
        type: 'timing',
      }}
      style={styles.shape}
    />
  )
}

export default function HelloWorld() {
  const [visible, toggle] = useReducer((s) => !s, true)

  return (
    <Pressable onPress={toggle} style={styles.container}>
      {visible && <Shape />}
    </Pressable>
  )
}

const styles = StyleSheet.create({
  shape: {
    justifyContent: 'center',
    height: 250,
    width: 250,
    borderRadius: 25,
    marginRight: 10,
    backgroundColor: 'white',
  },
  container: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
    flexDirection: 'row',
    backgroundColor: '#9c1aff',
  },
})

Package versions

@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”

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

5reactions
nandorojocommented, Feb 15, 2021

Turns out the solution is

npm install hermes-engine@v0.5.2-rc1

Or, upgrade to RN 0.64.x and Hermès 0.7.

Hermès v0.5.2-rc1, which targets RN 0.63, enables Proxy by default. Same goes for 0.7 on 64.

1reaction
nandorojocommented, Feb 11, 2021

Hey, creator of Moti here. It would appear that Framer Motion uses Proxy, and Moti imports framer-motion.

@jakub-gonet is there a polyfill or any alternative that you know of, or should I just hide this feature on Android devices?

Read more comments on GitHub >

github_iconTop Results From Across the Web

RefrenceError: Property 'Proxy' doesn't exist - Stack Overflow
It works in "debug" mode because this mode runs JavaScript in V8 on the host, rather than in Hermes on device.
Read more >
Troubleshooting - consistencss
If Hermes is enabled in your project, you probably will see a red screen with the "Property 'Proxy' doesn't exist, js engine: hermes"...
Read more >
Property 'Proxy' doesn't exist, js engine: hermes - Bountysource
This updated version works fine for iOS app except when the app is in background and when the notification is received the following...
Read more >
this can also happen when the js bundle is corrupt or there is ...
ReferenceError: Property 'Component' doesn't exist, js engine: hermes Invariant Violation: Module AppRegistry is not a registered callable module (calling ...
Read more >
Hermes Engine (@HermesEngine) / Twitter
We have recently added ES6 Proxy support to Hermes. Help us test it in your React Native 0.62 based app with npm install...
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