Error: Ionic doesn't support using Cordova with @ionic/react projects

I’m trying to install cordova using " ionic cordova plugin add cordova-plugin-ble-central" so that I can create an ionic-react app which can communicate with bluetooth devices. However, I keep getting the error Ionic doesn’t support using Cordova with @ionic/react projects. We encourage you to try :zap: Capacitor :zap: (

Any ideas on how to fix this?

You can use Cordova plugins with Capacitor, but you have to install them with npm install .... ionic cordova plugin ... doesn’t work with Capacitor. See Capacitor - build cross platform apps with the web.

Alternatively there is also a Capacitor community plugin for Bluetooth Low Energy, see GitHub - capacitor-community/bluetooth-le: Capacitor plugin for Bluetooth Low Energy