React-Native errors when using realm

I am trying to set up an electron app with angular 14.
Added all the latest packages but when I try to run the application I am alwaysa getting
Module not found: Error: Can’t resolve ‘react-native’ in {Path_To_App}\node_modules\realm\lib\browser’ .

If I add react native to allow list using node-externals app wont launch with ES require() is not supported error
If I remove references to realm then app launches without any issues.

This is a blocker for us to proceed further with our realm adaption,