This issue started happening to us yesterday with no changes in code; probably some dependent library issue.
The problem happens when you run amplify codegen
amplify codegen