amplify-cli: amplify push fails after upgrading to cli 7.6.2
Before opening, please confirm:
- I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
- I have searched for duplicate or closed issues.
- I have read the guide for submitting bug reports.
- I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
16.13.1
Amplify CLI Version
7.6.2
What operating system are you using?
Windows
Amplify Categories
auth, storage, function, api
Amplify Commands
push
Describe the bug
amplify push ? Are you sure you want to continue? Yes √ A migration is needed to support latest updates on api resources. Recommended to try in a non-production environment first. Run “amplify env add” to create or clone an environment. Learn more about this migration: https://docs.amplify.aws/cli/migration/override Do you want to migrate api resource “resources”? (Y/n) · yes
× An error occurred when pushing the resources to the cloud 🛑 An error occurred during the push operation: Cannot read properties of undefined (reading ‘forEach’)
Before saying “yes” to the migration step, there were api-params.json and parameters.json files under the existing resources. After running this command all the api-params.json and parameters.json files are deleted and the command itself fails with the above message. It even deletes the cloud formation templates which were customized as per requirements.
After this I uninstalled amplify cli and installed version 6.4.0 and took a fresh git clone.
Everything worked fine with 6.4.0 version of amplify cli.
Expected behavior
Amplify push should create the resources in the cloud without any error.
Reproduction steps
Create amplify project with amplify version < 7. Add API to the project. Customize the API’s cloud formation template to add a custom authorizer or to covert it to a web socket API. Run Amplify push. It runs successfully. Upgrade amplify to the latest version. Make any change in the API. For eg., change a description in the cloud formation template. Again run Amplify Push. It gives the error mentioned above.
GraphQL schema(s)
# Put schemas below this line
Log output
# Put your logs below this line
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 16 (10 by maintainers)
we have the same issue
+1