+1, resetting package caches seems to be the only, albeit temporary, remedy for me too. Though unlike @beeef, I only get the build errors occasionally. I haven't dug deeper into it but Package.resolved is definitely at the center of the issue because I've noticed it being modified after resetting package caches, which makes the errors go away.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: