Realm in a Electron + Vite project

Hello guys, I’m trying to implement a local database with Realm in my project that vite + electron but I’m facing several errors.
In the official documentation it asks to install crack, but crack is only for create-react-app.
I’ve tried booting several ways and they all point to this error:

[vite] Internal server error: Failed to resolve entry for package “realm”. The package may have incorrect main/module/exports specified in its package.json: No known conditions for “.” specifier in “realm” package

I just do the “import Realm from ‘realm’” and this error appears.
Please, help :smiling_face_with_tear: :sob:

you have to use realm as native module

did you solve that problem sir ?

How you solve the problem sir? I’m facing that problem now whether I already install the realm packages!