Has anyone installed yjs for react native?

Hi all, trying to install yjs to use with react native but running into issues on startup:

 ERROR  ReferenceError: Property 'crypto' doesn't exist, 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

Not sure if anyone ran into this before or has some insight on how to get it running with react native (if at all possible).

This might be useful for you:

The error you are seeing is related to a built-in web library, crypto, that is not available in the react native environment, but I don’t know much beyond that.

Thanks that gave a huge hint. Installed expo-standard-web-crypto but wasn’t able to polyfill it so I manually imported the crypto library in webcrypto.js file.

1 Like

Were you eventually able to et it working? Did you use expo?