找到带有“userPools”提供程序的 @auth 指令,但该项目没有配置 Cognito 用户池身份验证提供程序

Lak*_*mod 5 aws-amplify aws-userpools

当我尝试执行“放大推送”时,此错误消息显示在我的 ide 控制台中。

\n

\xc3\x97 将资源推送到云时发生错误\n@auth 指令并找到“userPools”提供程序,但项目没有配置 Cognito 用户池身份验证提供程序。

\n

有人可以帮我解决这个问题吗?

\n

liv*_*ove 14

你需要运行:

amplify update api

? Please select from one of the below mentioned services: GraphQL
? Select from the options below Walkthrough all configurations
? Choose the default authorization type for the API Amazon Cognito User Pool
Use a Cognito user pool configured as a part of this project.
? Do you want to configure advanced settings for the GraphQL API No, I am done.
Run Code Online (Sandbox Code Playgroud)

然后运行:

amplify push
Run Code Online (Sandbox Code Playgroud)