brent
07/24/2021, 9:25 PMcreate-react-app
application. Seem to be able to get through deployment fine when I use StaticSite
:
const dashboard = new StaticSite(contentApiStack, "AuthSPA", {
path: "../js/auth-spa/src",
buildCommand: "yarn run build",
});
but when I use the fancy new ReactStaticSite
:
const dashboard = new ReactStaticSite(contentApiStack, "AuthSPA", {
path: "../js/auth-spa/src",
buildCommand: "yarn run build",
environment: {
REACT_APP_CONTENT_API: "...",
REACT_APP_TINA_API_URL: "...",
REACT_APP_BASE_HOSTNAME: "..."
},
});
I'm getting: dev-tina-cloud-stack-content-api-stack | CREATE_FAILED | Custom::SSTBucketDeployment | AuthSPACustomResource7B33DD08 Received response status [FAILED] from custom resource. Message returned: 'NoneType' object is not iterable (RequestId: ce075f86-efb9-49f0-9edc-bf8016b57e78)
Happy to move this into a GH issue if you'd rather!Patrick Young
07/24/2021, 11:26 PMFrank
.build/cdk.out/dev-tina-cloud-stack-content-api-stack.template.json
?Frank
buildOutput
when you were using the StaticSite
. In that case SST zips up the entire path ../js/auth-spa/src
, which likely won’t work for a React app.Frank
buildOutput
defaults to build
. This is the default output directory when you build your React app (ie. yarn run build
)Frank
sst build
, then go to ../js/auth-spa/src
and see if the build
directory is created?brent
07/27/2021, 12:56 AMbuildOutput
set to this dir just to be sure. Still getting the same error.Frank
/src
brent
07/27/2021, 1:33 AMbrent
07/27/2021, 1:34 AM/src
in the path. But my CRA app also had an /src
directory https://docs.serverless-stack.com/constructs/ReactStaticSite#creating-a-react-appbrent
07/27/2021, 1:34 AMFrank
path
and buildOutput
path exist.