Hey there - is there. reason you’re trying to install realm within a serverless function? The realm package is intended to be used with a client such as a mobile app or a device on the edge so it can store data locally rather than in an ephemeral function.
Apologise, when you select a custom function for confirmation method in the user authentication process, there is an example in the auto-generated “confirmFunc”. I miss read the example and didn’t see that it was an example that needed to be called from the app using the realm sdk