During new site migration you may get below error as in picture with message like
"Uncaught Server Exception
There was an error building this page
Solution :
For this you can run bench migrate and you will come and know which app you are required to switch branch
For that go into the app folder and perform switch branch with example of steps below and check out and after do bench migrate
cd apps/hrms
git fetch upstream version-14:version-14
git checkout version-14
cd ../..
You can read more at : https://github.com/frappe/hrms/wiki/Changes-to-branching-and-versioning