amplify-cli: Build of api failed: missing api-params.json
Which Category is your question related to? Build amplify with the newest version of amplify-cli
Amplify CLI Version 7.5.5
What AWS Services are you utilizing? amplify
App ID and region: do5lfh5kuwuas, eu-west-1
Provide additional details e.g. code snippets
✔ Initialized provider successfully. 2021-12-01T14:48:28.059Z [INFO]: 🛑 Error reading api-params.json file for MYAPI resource 2021-12-01T14:48:28.118Z [WARNING]: ✖ An error occurred when pushing the resources to the cloud 2021-12-01T14:48:28.120Z [WARNING]: ✖ There was an error initializing your environment. 2021-12-01T14:48:28.123Z [INFO]: [0mError: File at path: '/codebuild/output/src918130845/src/***/amplify/backend/api/MYAPI/api-params.json' does not exist[0m [0m at Function.JSONUtilities.readJson (/root/.nvm/versions/node/v12.21.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-cli-core/src/jsonUtilities.ts:25:15)[0m [0m at ApigwInputState.migrateApigwResource (/root/.nvm/versions/node/v12.21.0/lib/node_modules/@aws-amplify/cli/node_modules/@aws-amplify/amplify-category-api/src/provider-utils/awscloudformation/apigw-input-state.ts:127:44)[0m [0m at runMicrotasks (<anonymous>)[0m [0m at processTicksAndRejections (internal/process/task_queues.js:97:5)[0m 2021-12-01T14:48:28.147Z [ERROR]: !!! Build failed 2021-12-01T14:48:28.147Z [ERROR]: !!! Non-Zero Exit Code detected
I am having this issue with the latest version of amplify-cli. No problem with 7.5.4.
Indeed the required file does not exist and never existed! No problem until today.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 22 (11 by maintainers)
Same problem here, everything worked until two days ago.
First error noticed this morning was
File at path: '/codebuild/output/src781572205/src/preorder-aws/amplify/backend/api/AdminQueries/api-params.json' does not existThen when retrying the error became this (without touching the codebase)
Noticed the error just on CI/CD, I’ve not tried it locally yet. My API was created more than 1 year ago.
Seeing a similar issue, no changes were made to my code base, but builds are failing in the CI/CD system. Building/publishing locally works using CLI 6.3.1 that is on my machine. The build worked yesterday, and I just re-triggered the same branch to build through amplify console and it fails to update Lambdas with:
Confirmed working in CI/CD if I pin version 7.5.4 of Amplify CLI in the Amplify portal build settings. The issue seems to have been introduced in 7.5.5