amplify-cli: amplify build is breaking backend override
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
16.18.1
Amplify CLI Version
10.6.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 manual changes made
Describe the bug
It’s been 2 months since I last deployed or touched my amplify project. Getting back to it today to add analytics I couldn’t deploy due to errors.
I updated the amplify cli to latest but I’m not sure what version I updated from.
Expected behavior
I expect amplify build not to break subsequent builds
Reproduction steps
- amplify checkout dev --restore
- amplify build (no issues, but lots of changes in backend-config.json and amplify-dependent-resources-ref.d.ts. Mostly looks like properties are now in alphabetical order)
- amplify build (second time)
error
Failed to override pccapi due to: InvalidOverrideError: Packaging overrides failed..
Project Identifier
729269ed0dfa7238ed8a5b3b8f9c5f9a
Log output
2023-01-16T16:58:57.492Z|info : amplify env core checkout dev {"restore":true,"yes":false}
2023-01-16T16:58:58.340Z|info : amplify-provider-awscloudformation.system-config-manager.getProfileConfig(["XXXX"])
2023-01-16T16:58:58.340Z|info : amplify-provider-awscloudformation.system-config-manager.getProfiledAwsConfig.profileConfig([{"region":"us-west-2"}])
2023-01-16T16:58:58.340Z|info : amplify-provider-awscloudformation.system-config-manager.getProfileCredentials(["XXXX"])
2023-01-16T16:58:58.346Z|info : amplify-provider-awscloudformation.system-config-manager.getProfileConfig(["XXXX"])
2023-01-16T16:58:58.347Z|info : amplify-provider-awscloudformation.system-config-manager.getProfiledAwsConfig.profileConfig([{"region":"us-west-2"}])
2023-01-16T16:58:58.347Z|info : amplify-provider-awscloudformation.system-config-manager.getProfileCredentials(["XXXX"])
2023-01-16T16:58:58.351Z|info : amplify-provider-awscloudformation.zip-util.downloadZip.s3.getFile([{"Key":"[***]rent-[***]ud-[***]d.zip"},null])
2023-01-16T16:58:58.351Z|info : amplify-provider-awscloudformation.aws-s3.s3.getFile([{"Key":"[***]rent-[***]ud-[***]d.zip","Bucket":"[***]ify-[***]dcentral-[***]ev-[***]522-[***]ment"}])
2023-01-16T16:59:01.764Z|info : amplify-provider-awscloudformation.initialize-env.run.cfn.updateamplifyMetaFileWithStackOutputs([{"StackName":"[***]ify-[***]dcentral-[***]ev-[***]522"}])
2023-01-16T16:59:01.765Z|info : amplify-provider-awscloudformation.aws-cfn.updateamplifyMetaFileWithStackOutputs.cfn.listStackResources([{"StackName":"[***]ify-[***]dcentral-[***]ev-[***]522"}])
2023-01-16T16:59:02.574Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]ify-[***]dcentral-[***]ev-[***]522"}])
2023-01-16T16:59:03.029Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]92:stack/[***]ify-[***]dcentral-[***]ev-[***]522-[***]uthStack-[***]WTE547/[***]2e10-[***]41-[***]ed-[***]9f-[***]47b19"}])
2023-01-16T16:59:03.030Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]92:stack/[***]ify-[***]dcentral-[***]ev-[***]522-[***]capi-[***]0A70NA/[***]6ac0-[***]41-[***]ed-[***]db-[***]2dbe7"}])
2023-01-16T16:59:03.031Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]92:stack/[***]ify-[***]dcentral-[***]ev-[***]522-[***]ntral772995b7-[***]YF4CY/[***]ea10-[***]1b-[***]ed-[***]00-[***]c8217"}])
2023-01-16T16:59:03.033Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]92:stack/[***]ify-[***]dcentral-[***]ev-[***]522-[***]olGroups-[***]Y7P9SD/[***]c010-[***]c0-[***]ed-[***]08-[***]db3e1"}])
2023-01-16T16:59:03.034Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]92:stack/[***]ify-[***]dcentral-[***]ev-[***]522-[***]erDbCRUD-[***]H39CKA/[***]c650-[***]4a-[***]ed-[***]2d-[***]9b319"}])
2023-01-16T16:59:03.035Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]92:stack/[***]ify-[***]dcentral-[***]ev-[***]522-[***]rconfigs-[***]7PO90/[***]5420-[***]4a-[***]ed-[***]e4-[***]5fe15"}])
2023-01-16T16:59:03.704Z|info : amplify-provider-awscloudformation.aws-s3.s3.getFile([{"Key":"[***]ify-[***]json","Bucket":"[***]ify-[***]dcentral-[***]ev-[***]522-[***]ment"}])
2023-01-16T18:13:57.774Z|info : amplify add analytics
2023-01-16T18:13:57.809Z|info : amplify-cli-core.banner-message/index.ts.fetch banner messages from https://aws-amplify.github.io/amplify-cli/banner-message.json({}
2023-01-16T18:15:21.374Z|info : amplify upgrade core
2023-01-16T18:15:21.415Z|info : amplify-cli-core.banner-message/index.ts.fetch banner messages from https://aws-amplify.github.io/amplify-cli/banner-message.json({}
2023-01-16T18:17:29.099Z|info : amplify push core
2023-01-16T18:17:29.147Z|info : amplify-cli-core.banner-message/index.ts.fetch banner messages from https://aws-amplify.github.io/amplify-cli/banner-message.json({}
2023-01-16T18:17:30.241Z|info : amplify-provider-awscloudformation.system-config-manager.getProfileConfig(["XXXX"])
2023-01-16T18:17:30.241Z|info : amplify-provider-awscloudformation.system-config-manager.getProfiledAwsConfig.profileConfig([{"region":"us-west-2"}])
2023-01-16T18:17:30.242Z|info : amplify-provider-awscloudformation.system-config-manager.getProfileCredentials(["XXXX"])
2023-01-16T18:17:30.247Z|info : amplify-provider-awscloudformation.system-config-manager.getProfileConfig(["XXXX"])
2023-01-16T18:17:30.248Z|info : amplify-provider-awscloudformation.system-config-manager.getProfiledAwsConfig.profileConfig([{"region":"us-west-2"}])
2023-01-16T18:17:30.248Z|info : amplify-provider-awscloudformation.system-config-manager.getProfileCredentials(["XXXX"])
2023-01-16T18:17:30.252Z|info : amplify-provider-awscloudformation.zip-util.downloadZip.s3.getFile([{"Key":"[***]rent-[***]ud-[***]d.zip"},null])
2023-01-16T18:17:30.252Z|info : amplify-provider-awscloudformation.aws-s3.s3.getFile([{"Key":"[***]rent-[***]ud-[***]d.zip","Bucket":"[***]ify-[***]dcentral-[***]ev-[***]522-[***]ment"}])
2023-01-16T18:17:32.411Z|info : amplify-provider-awscloudformation.initialize-env.run.cfn.updateamplifyMetaFileWithStackOutputs([{"StackName":"[***]ify-[***]dcentral-[***]ev-[***]522"}])
2023-01-16T18:17:32.413Z|info : amplify-provider-awscloudformation.aws-cfn.updateamplifyMetaFileWithStackOutputs.cfn.listStackResources([{"StackName":"[***]ify-[***]dcentral-[***]ev-[***]522"}])
2023-01-16T18:17:33.041Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]ify-[***]dcentral-[***]ev-[***]522"}])
2023-01-16T18:17:33.658Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]92:stack/[***]ify-[***]dcentral-[***]ev-[***]522-[***]uthStack-[***]WTE547/[***]2e10-[***]41-[***]ed-[***]9f-[***]47b19"}])
2023-01-16T18:17:33.659Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]92:stack/[***]ify-[***]dcentral-[***]ev-[***]522-[***]capi-[***]0A70NA/[***]6ac0-[***]41-[***]ed-[***]db-[***]2dbe7"}])
2023-01-16T18:17:33.661Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]92:stack/[***]ify-[***]dcentral-[***]ev-[***]522-[***]ntral772995b7-[***]YF4CY/[***]ea10-[***]1b-[***]ed-[***]00-[***]c8217"}])
2023-01-16T18:17:33.662Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]92:stack/[***]ify-[***]dcentral-[***]ev-[***]522-[***]olGroups-[***]Y7P9SD/[***]c010-[***]c0-[***]ed-[***]08-[***]db3e1"}])
2023-01-16T18:17:33.663Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]92:stack/[***]ify-[***]dcentral-[***]ev-[***]522-[***]erDbCRUD-[***]H39CKA/[***]c650-[***]4a-[***]ed-[***]2d-[***]9b319"}])
2023-01-16T18:17:33.665Z|info : amplify-provider-awscloudformation.aws-cfn.describeStack.cfn.describeStacks([{"StackName":"[***]rmation:us-[***]st-[***]92:stack/[***]ify-[***]dcentral-[***]ev-[***]522-[***]rconfigs-[***]7PO90/[***]5420-[***]4a-[***]ed-[***]e4-[***]5fe15"}])
2023-01-16T18:17:34.211Z|info : amplify-provider-awscloudformation.aws-s3.s3.getFile([{"Key":"[***]ify-[***]json","Bucket":"[***]ify-[***]dcentral-[***]ev-[***]522-[***]ment"}])
2023-01-16T18:18:08.706Z|error : Packaging lambda function failed with the error
Command failed with exit code 127: npm run-script amplify:parserDbCRUD
/var/folders/sg/vcm3djgs71zbj9wyznxgtvbw0000gn/T/amplifyparserDbCRUD-800ebd8e.sh: line 1: node_modules/.bin/tsc: No such file or directory
> parser-command-central@1.0.7 amplify:XXXX
> cd amplify/backend/function/XXXX/src && npm i && node_modules/.bin/tsc -p ./tsconfig.json && cd -
changed 3 packages, and audited 293 packages in 778ms
10 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
DeploymentFault: Packaging lambda function failed with the error
Command failed with exit code 127: npm run-script amplify:XXXX
/var/folders/sg/vcm3djgs71zbj9wyznxgtvbw0000gn/T/amplifyparserXXXX-800ebd8e.sh: line 1: node_modules/.bin/tsc: No such file or directory
> parser-command-central@1.0.7 amplify:XXXX
> cd amplify/backend/function/XXXX/src && npm i && node_modules/.bin/tsc -p ./tsconfig.json && cd -
changed 3 packages, and audited 293 packages in 778ms
10 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Additional information
No response
Before submitting, please confirm:
- 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.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 17 (5 by maintainers)
The issue is resolved after upgrading MacOS Ventura to 13.2 (22D49)