The package.json in the upstream repo lists "electron": "^37.1.0" as a devDependency. The current PKGBUILD depends on the system electron (v40+), which may be incompatible. Recommend switch to using electron37 from the AUR to match the upstream build target, as done in ente-desktop-bin.
Just to be clear and for ease of use (and although already documented in the self-hosted-ente-README.txt I added to this package):
To building Ente desktop to connect to a self hosted server,
make sure the NEXT_PUBLIC_ENTE_ENDPOINT environment variable is set before making the package.
For example:
export NEXT_PUBLIC_ENTE_ENDPOINT="https://myownenteserverdomain.com"
makepkg -sic
Or:
export NEXT_PUBLIC_ENTE_ENDPOINT="https://myownenteserverdomain.com"
yay -S ente-desktop-git