Mark Fox
10/27/2021, 11:13 PMStaticSite
and must be missing something. All I've done is set up the default SST project (npx create-serverless-stack@latest blah
), created the default Nuxt project in the root of that (npx create-nuxt-app frontend
), and then modified MyStack.js to tell StaticSite
how to build the Nuxt app and where to find the static files. Easy. An npx sst start
works but deploys an SST place-holder site which recommends doing an npx sst deploy
. So I do that and visit the CloudFront link spat out by the deploy. I get an access denied error expressed as an XML document.Frank
buildOutput
is pointing to the right folder?Mark Fox
10/28/2021, 3:29 PMconst site = new sst.StaticSite(this, "Nuxt Site", {
path: "frontend",
buildOutput: "dist",
buildCommand: "npm run generate",
errorPage: StaticSiteErrorOptions.REDIRECT_TO_INDEX_PAGE,
});
this.addOutputs({
"CloudFront URL": site.url,
})
./blah
is the project, ./blah/frontend
is the Nuxt frontend, and ./blah/frontend/dist
should be the buildOutput
, right?Mark Fox
10/28/2021, 10:21 PMMarkDev-serverless-stack-my-stack | CREATE_FAILED | Custom::SSTBucketDeployment | NuxtSiteS3Deployment763A63D1 Received response status [FAILED] from custom resource. Message returned: 'NoneType' object is not iterable (RequestId: 343c6e21-b674-4589-a352-3128f375d0ff)
Unless I'm off with my understanding of the path
and buildOutput
parameters, I'm thinking something is up with StaticSite. I'm happy to do what I can to help sort it out, but I'm going to avoid depending on it for now.Frank
./blah/frontend/dist
page?Frank
Frank
Frank
Frank
npm install
at the root
2. npm install
inside site/
where the Nuxt.js app is
3. npm run deploy
at the root
And this is the deployed siteFrank
Mark Fox
10/29/2021, 2:20 PM./blah/frontend/dist
contains the _nuxt
and inspire
folders, .nojekyll
, 200.html
, favicon.ico
, `index.htm`l, v.png
, and vuetify-logo.svg
. Just as one would expect after doing npx nuxt-init blah; cd blah; npm run generate
. So the buildCommand and buildOutput seem to be correct.Mark Fox
10/29/2021, 2:21 PMMark Fox
10/29/2021, 3:14 PMMark Fox
10/29/2021, 4:57 PMnpx sst deploy
and npm run deploy
. Or maybe the npm install
steps that I did with your project were necessary with mine. In any case, I'm going to try building another SST project from scratch to try to suss out why the one project misbehaves.Mark Fox
10/29/2021, 5:57 PMMark Fox
10/29/2021, 6:03 PMMarkDev-sst-mynuxtjs-my-stack failed: Received response status [FAILED] from custom resource. Message returned: 'NoneType' object is not iterable (RequestId: bef66244-952e-4de7-9fa9-c47890d6c807)
Mark Fox
11/01/2021, 10:03 PMnpx create-serverless-stack@latest
builds a new project.Frank
Mark Fox
11/02/2021, 2:20 PMMark Fox
11/02/2021, 5:05 PM