I am getting the same problem with building for device Xcode 12.5 with the import ArchiveByteStream no such module and errors around FilePath, FilePermissions Cannot find type in Scope.
fixed by adding
import System
and @available(iOS 14.0, *) for the function enclosing the archiving code