Ionic state restore is giving exception "Caught exception: undefined"

Hi,

Can anyone please help me in installing app locally? (I want to upgrade google api level from 30 to 33)

My ionic info:
Cordova CLI: Not installed
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
ios-deploy version: Not installed
ios-sim version: ios-sim/9.0.0 darwin-x64 node-v12.11.0
OS: macOS
Node Version: v12.11.0
Xcode version: Xcode 14.3 Build version 14E222b

sh-3.2$ gulp --version
CLI version: 2.3.0
Local version: 3.9.1

sh-3.2$ ionic state restore


Dependency warning - for the CLI to run correctly,
it is highly recommended to install/upgrade the following:

Please install your Cordova CLI to version >=4.2.0 npm install -g cordova
Install ios-deploy to deploy iOS applications to devices. npm install -g ios-deploy (may require sudo)


Attempting to restore your Ionic application from package.json

Restoring Platforms

cordova platform add ios
cordova platform add android
cordova platform add android
cordova platform add ios

Restore platforms is complete

Restoring Plugins

cordova plugin add cordova-plugin-device
Caught exception:
undefined

Mind letting us know? Issues · ionic-team/ionic-cli · GitHub

What needs to be done next?