Command CompileSwiftSources failed with a nonzero exit code

I got the following error:

Command CompileSwiftSources failed with a nonzero exit code

I updadted it to Monterey , and using xcode 13.2.1

I tried clean and rebuild I deleted the derivedData folder  still face the error:

Command CompileSwiftSources failed with a nonzero exit code

I get this error as well but only when I try to do an 'incremental' by clicking the 'RESUME' button in Xcode to run a PreviewProvider SwiftUI View.

Hopefully this gets fixed soon as this used to work and is very valuable when doing SwiftUI dev work.

Command CompileSwiftSources failed with a nonzero exit code
 
 
Q