Command failed with exit code 2 You may not have the required environment or OS to run this project

Hey Satish,

I had a similar problem that documented here: Invalid device state error when trying to emulate ios

Basically, I think you might have used sudo when you created your Ionic project, which creates permission problems when trying to emulate.

You need to recursively chown your project files to be able to build & emulate your project without using sudo. Example:

sudo chown -R stewartmccoy ~/Code/phone-signup/
sudo chown -R stewartmccoy ~/.config

See my linked post for additional details.