amplify-cli: amplify push error - resolvers directory not found

Describe the bug After adding a graphql API and pushing I receive this error: ENOENT: no such file or directory, scandir ‘/opt/projects/myApp/amplify/backend/api/myApp/build/resolvers’

To Reproduce Steps to reproduce the behavior: amplify init amplify add api use default options amplify push error

Expected behavior The API service should deploy

Desktop (please complete the following information):

  • OS: MacOS 10.13.6
  • Node 8.10
  • Amplify CLI 0.1.27

Additional context I have tried amplify delete and then the steps above and still get the issue. I’ve also tried manually adding the resolvers directory where it is specified, but it deletes as part of the build process and then throws the error.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (3 by maintainers)

Most upvoted comments

Try removing the API, then adding it again. I found that it would fail the first time, but if I dropped it and re-added it, it worked.

amplify remove api amplify add api