Error triggered on amplify push/pull after deleting then adding new fields to a custom Graphql type #13660
Closed
2 tasks done
Labels
pending-triage
Issue is pending triage
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v20
Amplify CLI Version
12.10.1
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.
No
Describe the bug
I ran a successful amplify push request for our graphql API. In this request, the only thing we changed was removing two String array fields from a custom type and adding some new fields to the same custom type. This type is not a model - it's being referenced in a model. After the successful push, whenever we try to perform another push command we get the following error:
PushResourcesFault: Cannot read properties of undefined (reading 'map')
at AmplifyToolkit.pushResources (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/extensions/amplify-helpers/push-resources.js:116:23)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.executeAmplifyCommand (/snapshot/amplify-cli/build/node_modules/@aws-amplify/amplify-category-function/lib/index.js:277:5)
at async executePluginModuleCommand (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:139:5)
at async executeCommand (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:37:9)
at async Object.run (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/index.js:121:5)
I'm assuming that the system still thinks the original two string array fields still exist but it can't find them so it throws this map error. I've tried running an amplify pull but I get a very similar error. So, at this point I'm stuck and can't update or pull my API at all.
Expected behavior
Amplify push command should run successfully without the aforementioned error.
Reproduction steps
Project Identifier
No response
Log output
Additional information
No response
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: