amplify-cli icon indicating copy to clipboard operation
amplify-cli copied to clipboard

amplify-cli generate a package.json file with a non existent cli-extensibility-helper version

Open maismail opened this issue 4 years ago • 1 comments

Before opening, please confirm:

  • [X] I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
  • [X] I have searched for duplicate or closed issues.
  • [X] I have read the guide for submitting bug reports.
  • [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • [X] 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?

16.17.0

Amplify CLI Version

10.3.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.

We override auth generated resources using amplify override as described in the documentation

Amplify Categories

auth

Amplify Commands

push

Describe the bug

Using the latest amplify versions 10.3.0 and 10.3.1 on CI/CD, the build process failed with the following error.

2022-10-25T08:05:55.459Z [INFO]: 🛑 Build error : Packaging overrides failed with the error:
                                 Command failed with exit code 1: yarn install
                                 warning package.json: No license field
                                 warning [email protected]: No license field
                                 error Couldn't find any versions for "@aws-amplify/cli-extensibility-helper" that matches "2.3.33-signinUpdate.1"
                                 yarn install v1.22.0
                                 info No lockfile found.
                                 [1/4] Resolving packages...
                                 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
2022-10-25T08:05:55.460Z [WARNING]: - Building resource storage/demos

We tried to search for that version 2.3.33-signinUpdate.1 on npmjs and we didn't find it, however, we found the 2.3.33-signinUpdate.0 version instead

We have also tried to reproduce the same behaviour on local machine using amplify push and we got the same error when we removed the existing amplify/backend/package.json file which was using ^2.0.0 version for cli-extensibility-helper.

Checking amplify-cli sourcecode, it seems that the version for the generated file has changed recently https://github.com/aws-amplify/amplify-cli/blob/v10.3.1/packages/amplify-cli-core/resources/overrides-resource/package.json#L11

Expected behavior

Amplify push and CI/CD should proceed as normal with no errors

Reproduction steps

  1. On an amplify project, delete existing amplify/backend/package.json
  2. Override auth using amplify override auth
  3. Run amplify push
  4. Check the generated amplify/backend/package.json file

GraphQL schema(s)

No response

Project Identifier

No response

Log output

No response

Additional information

No response

maismail avatar Oct 25 '22 14:10 maismail

Thanks for reporting this and adding so much context in the description @maismail!

As a workaround, I suggest updating the dependency in your package.json to depend on the latest 2.x version: "@aws-amplify/cli-extensibility-helper": "^2.0.0"

jhockett avatar Oct 25 '22 16:10 jhockett