IDE2.0.0-beta.5 simply stops compilation with “Unknown Error”, where IDE 1.8.13 clearly claims a missing .h-file (althoug also being on the wrong way, because a) there is no call to this file, and b) the file exists at the correct place – but at least it’s a message which guides to proper action)
It is possible that file is being called from one of the libraries you are using. This has happened to me and it was a real pain to find.
The current user experience with the Arduino IDE 2.x in this situation is really horrible, as is tracked here:
You can get an error message by enabling File > Preferences > Show verbose output during: [ ] Compilation, but even then it’s not the standard error message we are accustomed to.
Hopefully the situation will be improved in an upcoming release.