TypeError: _.set is not a function when building in macos


I am having an issue when building ionic v1 app in macos

when i run the command ionic cordova build ios, i get the following message

The Ionic CLI (local version) has an update available (3.7.0 => 3.9.2)! Would
you like to install it?

and when i choose yes or no the following message appears

TypeError: _.set is not a function

Could you help on resolving this issue

Thank you

outdated version of the inquirer npm module

npm install inquirer
(Should update it from version 3.0 to 5.0 or so)