Capacitor cap.native or cap create event Issue with static content

We have a capacitor app, where we have added a few scripts before my angular app loads, but, after it loads, it gives cap.nativePromise is not a function, whenever I give any API call, an API call fails after some time giving “timeout” error, any solution for this?

sometimes I get a blank screen with a cap. create event is undefined

I am using the latest version of the ionic capacitor and angular latest