New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(CLI v6.4.0) - amplify init is failing both in the Amplify pipeline and in CodeBuild #11481
Comments
HI @dragosiordachioaia thanks for reporting this issue! We were able to root cause this back to a bug in the aws-sdk: aws/aws-sdk-js#4286 This issue is fixed in the latest version of the CLI and we recommend upgrading to the latest version if possible. If for some reason, you cannot upgrade, you can probably override the dependency. This Stack Overflow question may be helpful: https://stackoverflow.com/questions/15806152/how-do-i-override-nested-npm-dependency-versions You can also wait for the aws-sdk fix to be deployed, and then uninstall & reinstall the same Amplify CLI version. |
Thanks @jhockett, overriding the
None of these had any effect on the build step in the Amplify pipeline. The thing is though that I've also tried to disable the back-end and only leave the front-end step, which doesn't even have any Amplify commands in it, but the aws-exports.js file still isn't there, which leads me to believe that the problem happens when the environment is set up, rather than when my commands start running. |
Hey @dragosiordachioaia please upgrade the Amplify CLI to one of the more recent versions, or override aws-sdk to the latest version.
When toggling Amplify Hosting to frontend-only, it will still run an |
Before opening, please confirm:
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
16.14.2
Amplify CLI Version
6.4.0
What operating system are you using?
Amazon Linux 2
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No manual changes
Amplify Categories
Not applicable
Amplify Commands
init
Describe the bug
In the Amplify console, it's failing to generate the aws-exports.json file. In a separate CodeBuild pipeline, I'm getting this error when trying to run amplify init:
Expected behavior
It should not fail to initialise the environment. The very same setup worked earlier today.
Reproduction steps
Run the init script in a CodeBuild environment (assuming you have provided the environment variables to it) - this was taken from the Amplify examples in GitHub and it worked until now:
GraphQL schema(s)
# Put schemas below this line
Project Identifier
I don't have this in v6.4.0
Log output
Additional information
No response
The text was updated successfully, but these errors were encountered: