Benjamin Ikwuagwu
Benjamin Ikwuagwu

Reputation: 459

No Amplify backend project files detected within this folder

How can I solve the issue of "No Amplify backend project files detected within this folder. Either initialize a new Amplify project or pull an existing project" Am always having this issue on Windows with Amplify. I am following the TindeClone, just for me to come back to it after I took a break I got "Could not attach the backend to the project. Ensure that there are no applications locking the amplify folder and try again". These issues are frustrating me how how do I solve it and move on. Here's the screenshot enter image description here

Thanks for you kind response.

Upvotes: 17

Views: 13879

Answers (4)

Andre Greeff
Andre Greeff

Reputation: 211

Edit: take special note of Dylan's comment below:

This will erase the amplify project and resources in the cloud, then re-create. You can view instructions how to re-pull the existing environment within the amplify console under the "backend environments tab".

amplify pull --appId {amplify app id} --envName {env name}

I was just recently struggling with the same blocker, after creating/deploying/testing an AWS Amplify project in my personal profile, I added a profile for my "client" (in this case, my brother), who created a specific AWS IAM user for me in his account.

The solution that I discovered, as per this AWS blog post, was to do the following from inside my project root folder:

  1. (if not already done) remove the currently deployed Amplify stack, using amplify delete
  2. delete the local "deployment information" file, using rm amplify/team-provider.info.json
  3. re-initialise a new AWS Amplify stack (i.e.: in the cloud) and generate the relevant local files for it, using amplify init
    • be sure to select the correct AWS profile or Key here for the new deployment, adding a new one if required..
  4. push your project to the newly initialised AWS Amplify stack, using amplify push for backend-only, or using amplify publish if you use Amplify Hosting

Disclaimer: as I'm still learning AWS, so I may possibly use incorrect terms and/or examples to explain what I've learnt. This answer is most definitely open to clarification by the community.. Either way, I hope it helps.

Upvotes: 0

Murthy Varanasi
Murthy Varanasi

Reputation: 136

Simple delete the amplify folder in your project run this amplify pull --appId xxxxx --envName xxxx

and when asked for Do you want changes backend select yes

This worked for me!

Upvotes: 11

Franklin Jayaraj
Franklin Jayaraj

Reputation: 71

Make sure that the .config file exists inside the amplify folder. It contains all the required configuration files.

enter image description here

Upvotes: 0

Waleed Ahmad
Waleed Ahmad

Reputation: 494

Are you sure you have "amplify" folder one step inside the "TinderClone" folder?

Amplify cli could not locate an amplify folder inside TinderClone.

Try `amplify pull with these steps IN A NEW EMPTY FOLDER.

$ amplify pull
? Select the authentication method you want to use: AWS profile
? Please choose the profile you want to use: (Use arrow keys)
? Please choose the profile you want to use: default
? Which app are you working on? (Use arrow keys)
> amplifyapp (XXXXXXXXXXXXX)
  amplifyapp (XXXXXXXXXXXXX)
  newsBot (XXXXXXXXXXXXX)
  TodoApp (XXXXXXXXXXXXX)               
  ImageDownloader (XXXXXXXXXXXXX)

it'll fetches resources from the cloud.

Let me know what happened.

Upvotes: 3

Related Questions