Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 571
Erik Slagter Avatar asked Nov 07 '22 18:11

Erik Slagter


1 Answers

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

like image 74
Erik Slagter Avatar answered Nov 10 '22 00:11

Erik Slagter