do following
1)
$npm install -g @aws-amplify/cli
2)
$amplify init
3)
and choose visual studio code, react, javascript project
4)
$amplify add codegen --apiId xxxxxxx
gives error,
Codegen support only one GraphQL API per project
this is a fresh new directory , fresh new amplify init and it tells me that i already have a backend api???
and there is no way to debug this there is no command such as
amplify api list etc
i also checked the generated json files there is no api mentioning in the json files.
looks like amplify add api is broken at this build.
Thank you
Thanks @EsrefDurna , we'll investigate this issue, could you provide these information for us?
amplify cli version 1.6.8
OS Mac OS mojave(latest)
@EsrefDurna
I was not able to reproduce the issue. But we will keep the issue open to investigate further on what happened and help you to resolve the issue you are having.
It'd be helpful if you can provide a screenshot of the error.
what about a screen capture?:)
sorry for the trouble, I reinstalled and it worked!
@EsrefDurna @UnleashedMind I had the same issue on windows. Uninstalling then re-installing the CLI didn't work but running amplify codegen remove
then amplify add codegen --apiId xxxxxxxxxxxxx
solved the problem for me.
Also have this issue today. I ran "amplify codegen remove" then "amplify codegen add". It works again now. Weird!
Most helpful comment
@EsrefDurna @UnleashedMind I had the same issue on windows. Uninstalling then re-installing the CLI didn't work but running
amplify codegen remove
thenamplify add codegen --apiId xxxxxxxxxxxxx
solved the problem for me.