jimmychu0807/substrate-front-end-template

Front end template throws errors when trying to deploy with AWS amplify -> [ERROR]: !!! CustomerError: Artifact directory doesn't exist: build

Closed this issue · 3 comments

The following error prevents deploying this project using AWS aplify
Sharing the build log

2021-08-04T03:39:04.833Z [INFO]: Agent pid 133
2021-08-04T03:39:04.837Z [INFO]: Identity added: /root/.ssh/git_rsa (/root/.ssh/git_rsa)
2021-08-04T03:39:05.072Z [INFO]: Cloning into 'did-book'...
2021-08-04T03:39:05.928Z [INFO]: Warning: Permanently added the RSA host key for IP address '13.236.229.21' to the list of known hosts.
2021-08-04T03:39:08.923Z [INFO]: # Checking for Git submodules at: /codebuild/output/src531242260/src/did-book/.gitmodules
2021-08-04T03:39:09.036Z [INFO]: # Retrieving environment cache...
2021-08-04T03:39:09.067Z [INFO]: # Retrieved environment cache
2021-08-04T03:39:09.068Z [INFO]: ---- Setting Up SSM Secrets ----
2021-08-04T03:39:09.068Z [INFO]: SSM params {"Path":"/amplify/d25muryx8zr0j5/staging/","WithDecryption":true}
2021-08-04T03:39:09.132Z [INFO]: # Ensuring NPM package '@aws-amplify/cli' is version: 'latest'
2021-08-04T03:39:14.578Z [INFO]: # Patching NPM package '@aws-amplify/cli' from 4.29.4 to 5.2.1...
2021-08-04T03:40:09.077Z [INFO]: # Done patching NPM package '@aws-amplify/cli'
2021-08-04T03:40:09.149Z [INFO]: # Retrieving cache...
2021-08-04T03:40:09.175Z [INFO]: # Extracting cache...
2021-08-04T03:40:09.187Z [INFO]: # Extraction completed
2021-08-04T03:40:21.385Z [INFO]: ## Starting Backend Build
                                 ## Checking for associated backend environment...
                                 ## Backend environment association found
2021-08-04T03:40:30.833Z [INFO]: �[0mAmplify AppID found: d25muryx8zr0j5. Amplify App name is: DID-book�[0m
2021-08-04T03:40:30.886Z [INFO]: �[0mBackend environment staging found in Amplify Console app: DID-book�[0m
2021-08-04T03:40:31.722Z [WARNING]: - Fetching updates to backend environment: staging from the cloud.
2021-08-04T03:40:31.961Z [WARNING]: ✔ Successfully pulled backend environment staging from the cloud.
2021-08-04T03:40:31.974Z [INFO]: 
2021-08-04T03:40:35.531Z [INFO]: �[33mNote: It is recommended to run this command from the root of your app directory�[39m
2021-08-04T03:40:40.457Z [WARNING]: - Initializing your environment: staging
2021-08-04T03:40:40.658Z [WARNING]: ✔ Initialized provider successfully.
2021-08-04T03:40:40.975Z [WARNING]: - Updating resources in the cloud. This may take a few minutes...
2021-08-04T03:40:42.621Z [INFO]: �[32mInitialized your environment successfully.�[39m
2021-08-04T03:40:42.622Z [INFO]: �[32mYour project has been successfully initialized and connected to the cloud!�[39m
                                 �[32mSome next steps:�[39m
                                 �[0m"amplify status" will show you what you've added already and if it's locally configured or deployed�[0m
                                 �[0m"amplify add <category>" will allow you to add features like user login or a backend API�[0m
                                 �[0m"amplify push" will build all your local backend resources and provision it in the cloud�[0m
                                 �[0m"amplify console" to open the Amplify Console and view your project status�[0m
                                 �[0m"amplify publish" will build all your local backend and frontend resources (if you have hosting category added) and provision it in the cloud�[0m
                                 �[32mPro tip:�[39m
                                 �[0mTry "amplify add api" to create a backend API and then "amplify publish" to deploy everything�[0m
2021-08-04T03:40:45.487Z [INFO]: ## Completed Backend Build
                                 ## Starting Frontend Build
                                 # Starting phase: build
2021-08-04T03:40:45.489Z [INFO]: # Completed phase: build
                                 ## Completed Frontend Build
2021-08-04T03:40:45.520Z [INFO]: ## Build completed successfully
2021-08-04T03:40:45.523Z [INFO]: # Starting caching...
2021-08-04T03:40:45.612Z [INFO]: # Creating cache artifact...
2021-08-04T03:40:45.617Z [INFO]: # Cache artifact is: 0MB
2021-08-04T03:40:45.617Z [INFO]: # Uploading cache artifact...
2021-08-04T03:40:45.688Z [INFO]: # Caching completed
2021-08-04T03:40:45.696Z [INFO]: No custom headers found.
2021-08-04T03:40:45.697Z [ERROR]: !!! CustomerError: Artifact directory doesn't exist: build
2021-08-04T03:40:45.697Z [INFO]: # Starting environment caching...
2021-08-04T03:40:45.698Z [INFO]: # Uploading environment cache artifact...
2021-08-04T03:40:45.765Z [INFO]: # Environment caching completed
Terminating logging...

This is an AWS issue, unrelated to the FE here.

@nukemandan I guess not since all the other React Apps works with AWS
This is n issue with the setup

@nukemandan Try to build this locally in prod mode and you will see the same error. please re open it
Thanks