go to Xcode->preferences->locations->set value for command Line tools.
CLT reference was missing there, giving the CLT value solved the issue for me.