简体   繁体   中英

Build of React application on AWS Amplify fails in Amplify Console

I can locally publish my application to the S3 bucket and the application works. But deployment through AWS Amplify console (web) fails on the Build step of the backend.

The build step of the backend fails because of a missing configuration file or directory.

{
  Error: ENOENT: no such file or directory, scandir '/codebuild/output/src145745747/src/aws-service-catalog/amplify/backend/auth/cognito8f0f2f1d'
      at Object.fs.readdirSync (fs.js:904:18)
      at getCfnFiles (/root/.nvm/versions/node/v8.12.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-provider-awscloudformation/lib/push-resources.js:337:20)
      at updateS3Templates (/root/.nvm/versions/node/v8.12.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-provider-awscloudformation/lib/push-resources.js:350:39)
      at packageResources.then.then.then.then (/root/.nvm/versions/node/v8.12.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-provider-awscloudformation/lib/push-resources.js:42:17)
      at <anonymous>
      at process._tickDomainCallback (internal/process/next_tick.js:229:7)
    errno: -2,
    code: 'ENOENT',
    syscall: 'scandir',
    path: '/codebuild/output/src145745747/src/aws-service-catalog/amplify/backend/auth/cognito8f0f2f1d'
}

Anybody has tips how to debug/resolve this problem?

See my reply on the thread above. The directory was not included in my git repo.

It's sad that aws amplify is not showing any details on build failure even on debug mode.

The solution is recloning the app and test locally and then push the changes.

The problem happens to be Git is missing changes. This git issue is resolved by following this steps

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM