Error: undefined is not a function while installing deep link plugin


I get this error while I was trying to install ionic-plugin-deeplinks for android platform using this commnad -

sudo ionic plugin add ionic-plugin-deeplinks --variable URL_SCHEME=ionichats --variable DEEPLINK_SCHEME=https --variable

… though I was successfully able to install it on ios platform

Failed to install ‘ionic-plugin-deeplinks’:TypeError: undefined is not a function