Raise error when the platform is not specified.

When commands "compile", "deploy" & "run" are invoked, if the platform is not specified, raise error to users.