最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to solve Amplify backend-config.json does not exist issue - Stack Overflow

programmeradmin3浏览0评论

I upgraded Amplify CLI, but I discovered in my amplify/backend/backend-config.json file has disappeared after taking a day to discovered that. Then I have tried running amplify init again with the options to continue with my existing environment or new environment, and I have tried both but still got the same error

Error: File at path: 'C:\Users\BEN\documents\TinderClone\amplify\backend\backend-config.json' does not exist

What do I do to solve this error (to get the backend-config.json back).

I upgraded Amplify CLI, but I discovered in my amplify/backend/backend-config.json file has disappeared after taking a day to discovered that. Then I have tried running amplify init again with the options to continue with my existing environment or new environment, and I have tried both but still got the same error

Error: File at path: 'C:\Users\BEN\documents\TinderClone\amplify\backend\backend-config.json' does not exist

What do I do to solve this error (to get the backend-config.json back).

Share Improve this question edited Jan 30, 2023 at 15:10 margincall 4821 gold badge6 silver badges24 bronze badges asked Sep 27, 2021 at 23:21 Benjamin IkwuagwuBenjamin Ikwuagwu 4592 gold badges13 silver badges32 bronze badges 3
  • 1 backend-config.jason or backend-config.json? – Phil Commented Sep 27, 2021 at 23:23
  • Sorry, its backend-config.json – Benjamin Ikwuagwu Commented Sep 27, 2021 at 23:25
  • Does this happen after git clone? It's ignored by .gitignore file – Moshe Quantz Commented Feb 13, 2022 at 19:56
Add a ment  | 

4 Answers 4

Reset to default 5

I was able to solve this by using the amplify pull then navigating to the #current-cloud-backend and copying the file from there to the directory needed.

I solved this by first upgrading amplify by amplify upgrade , then deleted amplify folder at the root folder of the project, and then pulled the amplify project by specifying appId and envName like following amplify pull --appId xyz --envName dev At the console some questions will appear and the important one ise 'Do you plan on modifying this backend?' , I chose Yes. And finally backend folder is added.

I've solved the issue after more than 24 hours of frustration looking for the solution. In my C:\Users\BEN.amplify\bin I deleted the bin folder, and I upgraded the amplify CLI using:- "curl -sL https://aws-amplify.github.io/amplify-cli/install-win -o install.cmd && install.cmd" After the download and installation I restarted my system. That solved the backend-config.json does not exist issue.

I hope this works for you if you have this same issue.

backend:
  phases:
   build:
      mands:
        - amplifyPush --simple
        - mv ./amplify/\#current-cloud-backend/backend-config.json ./
发布评论

评论列表(0)

  1. 暂无评论