What version of GMS 2 are you using?
What is your target device you are trying to compile to (Windows/Mac/Android etc...)?
What GMS 2 license are you using? (Trial Version / Creator License / Developer License / Android Export etc...)?
Is your internet connection working properly? GMS 2 needs to validate its license every 30 days, perhaps it is unable to communicate with the YoYo Servers at the moment.
When did this start happening? Have you previously been able to compile without any errors?