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

ERROR TypeError: Cannot read property 'getInstance' of undefined, js engine: hermes #162

Open
Ankush-Hegde opened this issue Jun 22, 2024 · 0 comments

Comments

@Ankush-Hegde
Copy link

i was referring the pusher official doc and implemented as it was given. I wanted to implement the chat feature for the react native expo app.When i used this code I got the error.

const pusher = Pusher.getInstance();

await pusher.init({
apiKey: API_KEY,
cluster: API_CLUSTER
});

await pusher.connect();

ERROR TypeError: Cannot read property 'getInstance' of undefined, js engine: hermes
ERROR Invariant Violation: "main" has not been registered. This can happen if:

  • Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
  • A module failed to load due to an error and AppRegistry.registerComponent wasn't called., js engine: hermes

if i remove that code everything works fine

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

1 participant