Same error for me in Xcode 15.3:
my SwiftUI view is in a SPM package module.
that module has no dependencies on anything else
It builds fine.
But SwiftUI previews fail with "BuildError: failedToGenerateThunkInfo(could not generate preview info: noTargetBuildGraph)"