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

Initial Build Failed when creating new Gen 2 React Vite or Next app

Open protoEvangelion opened this issue 1 year ago • 3 comments

Environment information

System:
  OS: macOS 14.4.1
  CPU: (8) arm64 Apple M1
  Memory: 184.72 MB / 16.00 GB
  Shell: /bin/zsh
Binaries:
  Node: 20.12.2 - ~/n/bin/node
  Yarn: 1.22.19 - /opt/homebrew/bin/yarn
  npm: 9.8.1 - ~/.npm-global/bin/npm
  pnpm: undefined - undefined
NPM Packages:
  @aws-amplify/backend: 0.13.0-beta.15
  @aws-amplify/backend-cli: 0.12.0-beta.17
  aws-amplify: 6.0.28
  aws-cdk: 2.137.0
  aws-cdk-lib: 2.137.0
  typescript: 5.4.5
AWS environment variables:
  AWS_STS_REGIONAL_ENDPOINTS = regional
  AWS_NODEJS_CONNECTION_REUSE_ENABLED = 1
  AWS_SDK_LOAD_CONFIG = 1
No CDK environment variables

Description

Following https://docs.amplify.aws/gen2/start/quickstart/vite-react-app/ to setup gen2 React + Vite (or Next), I got all the way to the last line:

Review all of your settings to ensure everything is set up correctly. Choose Save and deploy to deploy your web app.

The tutorial omits instructions on which role to select so I went with the "Create and use a new service role" option. When clicking create & deploy, I receive an error page. If I navigate to "All Apps", no apps appear. I also tried a few of the gen2 roles to no avail.

image

image

Here is a link to my repo which should be a mirror image of the tutorial: https://github.com/protoEvangelion/postcards

protoEvangelion avatar Apr 11 '24 17:04 protoEvangelion

I see different error Error updating stack: UPDATE_ROLLBACK_IN_PROGRESS The following resource(s) failed to update: [StagingBucket, ContainerAssetsRepository]. when I use all default settings to create a starter repo in github and deploy to amplify front end hosting.

harishanth avatar Apr 15 '24 14:04 harishanth

Looks related: https://github.com/aws-amplify/amplify-backend/issues/1229

Note I previously created an app with gen1 no problem.

I just created a brand new account and was able to deploy. So I guess we can chalk this up to a random account issue, though a more debuggable error would have been preferable.

protoEvangelion avatar Apr 15 '24 19:04 protoEvangelion

@protoEvangelion 👋 , I am glad to hear that you are unblocked and yes I agree that the error messaging needs improvement for debugging purposes and also to ensure clear next steps on how to resolve it.

Jay2113 avatar Apr 25 '24 17:04 Jay2113

@protoEvangelion can you please check out this: https://docs.amplify.aws/react/deploy-and-host/fullstack-branching/custom-pipelines/

swaminator avatar Jun 03 '24 17:06 swaminator

@protoEvangelion, we've recently deployed an update that enhances the error messaging to provide better clarity. I'll be closing this thread now. Thanks!

Jay2113 avatar Jun 26 '24 17:06 Jay2113