简体   繁体   English

AWS Amplify 构建错误:“SSR 应用程序不支持基本身份验证。”

[英]AWS Amplify build error: "Basic Auth is not supported for SSR apps."

I've created a very basic NextJS application to get familiar with the CI/CD pipeline AWS's Amplify service provides and I've run across an error that I'm not able to find any resources on.我创建了一个非常基本的 NextJS 应用程序来熟悉 AWS 的 Amplify 服务提供的 CI/CD 管道,但我遇到了一个无法找到任何资源的错误。

Error: Build failed: Basic Auth is not supported for SSR apps. Please disable Basic Auth before deploying your SSR app.

I have two branches that I am pushing up to Amplify, main and develop .我有两个分支要推进到 Amplify, maindevelop When I push to develop on Github and my pipeline triggers on Amplify I get the build error pictured below.当我推动在 Github 上进行develop并且我的管道在 Amplify 上触发时,我得到了下图所示的构建错误。 What's strange is, when I merged develop into master locally and then pushed up the changes to my repo, the build on my Amplify main pipeline completed without issue despite it being the exact same code.奇怪的是,当我在本地将develop合并到master中,然后将更改推送到我的 repo 时,我的 Amplify main道上的构建完成没有问题,尽管它是完全相同的代码。

I'm curious why that is, I've tried the reconnecting the webhook suggestion it provides (both before and after doing the develop -> main merge experiment) yet that doesn't seem to resolve anything.我很好奇为什么会这样,我已经尝试过重新连接它提供的 webhook 建议(在进行开发 -> 主合并实验之前和之后),但这似乎没有解决任何问题。

Again, my App is a vanilla NextJS application with some eslint/husky configurations.同样,我的应用程序是一个带有一些 eslint/husky 配置的普通 NextJS 应用程序。 There's really nothing there and when I first created the develop branch and hooked it up to Amplify it was building just fine.那里真的什么都没有,当我第一次创建开发分支并将其连接到 Amplify 时,它构建得很好。 I'd appreciate some help here since the error message doesn't result in anything when I google it.我很感激这里的一些帮助,因为当我用谷歌搜索错误消息时不会产生任何结果。

在此处输入图像描述

Access control must be disabled when using the SSR app.使用 SSR 应用程序时必须禁用访问控制。 https://docs.aws.amazon.com/amplify/latest/userguide/access-control.html https://docs.aws.amazon.com/amplify/latest/userguide/access-control.html

Click the app from the AWS Amplify console.从 AWS Amplify 控制台单击应用程序。 View image看图

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM