Unable to build a project with amplify 10.3.0
See original GitHub issueBefore 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.
- I have removed any sensitive information from my code snippets and submission.
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
14.x
Amplify CLI Version
10.3.0
What operating system are you using?
macos
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No manual changes made
Amplify Categories
Not applicable
Amplify Commands
Not applicable
Describe the bug
deploy an old project with amplify console and amplify cli 10.3.0 will failed
more detail in codebuild log
deploy with version 10.2.x works fine.
run localy, “amplify push” with version 10.3.0 will work.
Reproduction steps
every thing works fine with a new project …
GraphQL schema(s)
Project Identifier
ed57bb8a46476511162afa8497d78147
Log output
2022-10-18T21:35:58.642Z [INFO]: [0mBackend environment dev found in Amplify Console app: myproject[0m
2022-10-18T21:36:00.727Z [WARNING]: - Fetching updates to backend environment: dev from the cloud.
2022-10-18T21:36:02.485Z [WARNING]: - Building resource api/myprojectcontactapi549
2022-10-18T21:36:02.502Z [WARNING]: - Building resource api/AdminQueries
2022-10-18T21:36:02.516Z [WARNING]: - Building resource api/myprojectgraphql
2022-10-18T21:36:05.319Z [INFO]: ✅ GraphQL schema compiled successfully.
Edit your schema at /codebuild/output/src490452204/src/myproject/amplify/backend/api/myprojectgraphql/schema.graphql or place .graphql files in a directory at /codebuild/output/src490452204/src/myproject/amplify/backend/api/myprojectgraphql/schema
2022-10-18T21:36:05.322Z [WARNING]: - Building resource api/myapi
....
2022-10-18T21:36:05.376Z [WARNING]: - Building resource auth/authressource
2022-10-18T21:36:05.391Z [WARNING]: - Building resource auth/userPoolGroups
2022-10-18T21:36:05.453Z [WARNING]: - Building resource storage/mystorage
2022-10-18T21:36:18.220Z [WARNING]: ✔ Successfully pulled backend environment dev from the cloud.
2022-10-18T21:36:18.433Z [WARNING]: ✖ There was an error initializing your environment.
2022-10-18T21:36:18.914Z [INFO]: 🛑 Failed to pull the backend.
2022-10-18T21:36:18.915Z [INFO]: File at path: '/codebuild/output/src490452204/src/myproject/amplify/backend/auth/myproject0e23e38c0e23e38c/build/parameters.json' does not exist
Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/
2022-10-18T21:36:18.915Z [WARNING]: - Creating Zip
2022-10-18T21:36:19.008Z [INFO]:
2022-10-18T21:36:19.008Z [INFO]: ✅ Report saved: /tmp/myproject/report-1666128978926.zip
2022-10-18T21:36:19.008Z [WARNING]: - Sending zip
2022-10-18T21:36:19.008Z [INFO]: File at path: '/codebuild/output/src490452204/src/myproject/amplify/backend/amplify-meta.json' does not exist
2022-10-18T21:36:19.010Z [WARNING]: ✖ Sending zip
2022-10-18T21:36:19.152Z [ERROR]: !!! Build failed
2022-10-18T21:36:19.152Z [ERROR]: !!! Non-Zero Exit Code detected
Additional information
No response
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:11 (3 by maintainers)
Top Results From Across the Web
AWS-Amplify-cli fails to install on Mac - Stack Overflow
I have CHMOD 0777 on the project folder and then tried to install again without the -g flag, but same error. OS: Mojave...
Read more >@aws-amplify/cli vulnerabilities | Snyk
version published direct vulnerabilities
10.5.3‑circular‑dep‑fix.0 16 Dec, 2022 0. C. 0. H. 0. M. 0. L
11.0.0‑cdkv2.5 13 Dec, 2022 0. C. 0. H. 0....
Read more >Team workflows with Amplify backend environments
Create prod, test, and dev backend environments with the Amplify CLI. ... Install the Amplify CLI to initialize a new Amplify project.
Read more >@aws-amplify/cli - npm
Start using @aws-amplify/cli in your project by running `npm i @aws-amplify/cli`. ... 10.3.0-fix-bytecode-issue-with-arm64-revised.0.
Read more >Getting Started with AWS Amplify - Coder Society
In this article, you'll learn how Amplify works and how to build and ... commands that help you set up and maintain a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey @kouz75 and folks in the thread 👋 we were able to reproduce this with Amplify CLI 10.3.0 using the following steps (also noted in this comment):
amplify init -y
amplify add auth
amplify update auth
> add user pool groupsamplify push -y
git init
git clean -fXd
remove gitignored from local directory (to simulate fresh clone)amplify init --envName dev --yes
I’m going to mark this as a duplicate of #9508 and track as a new bug given it is impacting the latest version of the CLI
As a workaround, you can manually create a
parameters.json
file in the auth resource’s build directory with an empty object as the contents{}
prior to the headless init. In the case of Amplify Hosting, you can run this beforeamplifyPush --simple
I’m having this issue as well with amplify version 10.3.0 when I clone my project onto my local machine and try to initialize the backend environment using
amplify init
. This also occurs when my project tries to build in the cloud whenever CD is triggered on commits to git.EDIT: as a workaround you can downgrade your version of amplify CLI in build settings on the amplify console to
10.2.3
this should allow your project to build again. You can do the same locally by downgrading the cli version withnpm i @aws-amplify/cli@10.2.3