When I\'m running my Ionic app with ionic serve -l command, get following error message:
Runtime Error
Unca
Using cordova simulator helps prevent Error: Uncaught (in promise): cordova_not_available.
cordova simulatornpm install -g cordova-simulate
cordova simulator:From the command line anywhere within a Cordova project, enter the following:
simulate [platform] [--target=browser]
platform is any Cordova platform that has been added to your project. Defaults to browser.
browser is the name of the browser to launch your app in. Can be any of the following: default, chrome, chromium, edge, firefox, ie, opera, safari.Example:
simulate android --target=chrome
The above command will opens 2 tabs in chrome browser with the following URLs and ports:
You can use simulator tab for changing and simulating device conditions such as GPS coordinates, internet connection type, device orientation, etc. and you can use other tab to test your app.