When building synchronously, wait until the last moment before compiling, so that async compilation can occur and return a proper error.