No such module 'Amplify' & Could not read serialized diagnostics file: error("Invalid diagnostics signature")

I'm trying to compile an Xcode project. I'm getting 2 runtime errors:

No such module 'Amplify

&

/Users/????????/Library/Developer/Xcode/DerivedData/screener_app-gkvpndyzdgqrsreqyokgisatdzav/Build/Intermediates.noindex/screener_app.build/Debug-iphonesimulator/screener_app.build/Objects-normal/x86_64/AuthButtonView.dia:1:1: warning: Could not read serialized diagnostics file: error("Invalid diagnostics signature") (in target 'screener_app' from project 'screener_app') Command CompileSwift failed with a nonzero exit code

The screenshot is seen below.

I have tried a handful of things:

  • cleaned build folder
  • install/update pods
  • removedderived data

I'm not sure what to do from here. Any advice is appreciated.

Replies

The error message is pointing you to the solution. Open ApiService.swift and look for the import statement import Amplify remove it or make sure the module, framework or library is added to the project correctly.

  • Thanks for the response. Researching how to do that. Any advice?

  • I am seeing that the workspace is compiling but the project folder is not.

Add a Comment

I am having the same issue. Works great on xcode 13.1 (Big Sur). Moved the project to a new machine running xcode 13.4.1 (Monetery), deleted derived folder, clean built project, ran pod install/update, restarted xcode and computer but still the errors exist.

Any help is appreciated.

I had the same with TestTarget which can't resolve the main target local SPM finally, fix with this approach I added all main target dependencies to the test target too and after that find, I had some compiler issues in which the compiler showed me this wrong error, and when errors were fixed this error disappeared