There are troubleshooting tips here https://www.advancedcustomfields.com/resources/upgrade-guide-version-5/#troubleshooting.
The first thing you should probably do is roll back to V4. There are instructions on how to do this. Not the rest of the possible errors.
If all else fails, contact support https://www.advancedcustomfields.com/contact and they will try to resolve your issue.