-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gen 1 Updated Amplify CLI and getting errors on hosting push #2757
Comments
Hey,👋 thanks for raising this! I'm going to transfer this over to our API repository for better assistance 🙂 |
Hi @gakinson , that is indeed a strange error to see if DataStore is not enabled. Can you check your "conflictResolution": {
"defaultResolutionStrategy": {
"type": "AUTOMERGE"
}
}, If not, then I'm not sure why the hosting build would have it enabled. You then might want to check what version of the Amplify CLI the hosting build is using and make sure it matches the version you've upgraded to locally. |
Hello @chrisbonifacio, What I noticed in the amplify docs is that it is initialized when the aws-amplify/datastore dependency is added to the project, which is there by default when you use the aws-amplify library which is required. |
Thank you for sharing @gakinson . An empty config means that DataStore is not enabled on your API. Were you able to check the Amplify CLI version that your hosting build is using? Also, you mentioned removing "codegen related tasks" from the amplifyPush.sh script. Can you share what tasks exactly they were performing? Was there an |
@chrisbonifacio This did not end up resolving the issue for me in the end. I still get the Datastore error on each build that has an API change. To make the deployment green, I just run it twice for now and the second build will succeed because it detects there are no changes to api and then it will not run the codegen commands. |
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
18
Amplify CLI Version
12.12.5
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
nope
Describe the bug
We upgraded to use the latest CLI version from 10.8.X to 12.12.5 and the push works fine locally, but when we update it on the hosting cli build, we get the following error
My guess is that it has something to do with the Datastore thing, but we do not use datastore and would opt to disable/remove it from our amplify project, but we do not know how to.
One work around was to reproduce the amplifyPush.sh script and remove the codegen related tasks and then run an amplify push -y as a build step. Is there any issues in doing it this way? Or is there any way to disable Datastore.
Expected behavior
amplify deployment succeeds
Reproduction steps
Not really much to share here
Project Identifier
Log output
Additional information
No response
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: