简体   繁体   中英

Cant add api resource to AWS Amplify project

So I have ran the following commands to initialize my amplify project:

amplify configure
amplify init

Then i run amplify add api .

when I select "REST" api, it says "There was an error adding the API resource" Running amplify status confirms that nothing was added. However, when I try to add the "GraphQL" api, it gives me the same error message, but running amplify status indicates that it was actually added successfully.

i want to add REST api to my amplify app. Not sure what the issue is. I have tried updating amplify cli and reinitializing my project multiple times. thanks in advance.

I am seeing a similar error in the step: Try opening with system-default editor instead?

The error is:

在此处输入图像描述

There are 2 options that helped me

  • On this step select No
  • Install xdg-utils : sudo yum -y install xdg-utils (I am using EC2 linux 2 instance)

Try these options and let's see if it helps you.

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