I've been using the `ReactStaticSite` construct. I...
# help
a
I've been using the 
ReactStaticSite
 construct. It's been all good except right now, when I tried to deploy my site, sst does not upload to the s3 bucket. Seems like it's because it does not detect any changes.
Stack desktop-dp-backend-site-stack
Status: no changes
Now, the stack itself hasn't changed, but the site I'm trying to deploy did. Is there any ways for sst to detect the build output from the site has indeed changed? Thanks in advance!
t
Hm we actually always upload even if it hasn't changed. Are you using sst deploy?
And can I see the stack
a
I am using sst deploy
*const* staticSite = new sst.ReactStaticSite(this, "DailyPuck", {
      
path: "../daily-puck-fe",
      
buildCommand: "npm run build-docker",
    
});
that's the stack right there
The only thing I can think of right now is that I do have a bit of a convoluted build process. Basically, I'm stuck on Windows atm and I use a docker container to build. The build folder of the react app is a symlink. Maybe that's a thing?
that folder does get updated with the fresh build files. But it never gets uploaded to S3.
f
Just to chime in, @Alexis Levasseur by default, SST assumes the build output directory is
build
for React app.
a
yup, that's what I have too. Just as a symlink
f
Can you try this: 1. share your the CloudFormation template in
.build/cdk.out/desktop-dp-backend-site-stack.template.json
(dropping the file into this thread is good) 2. make a change to ur React site 3. run
npm run deploy
again, see if it the change gets deployed 4. if SST shows no changes, share the new CloudFormation template again
a
Sounds good
f
Comparing the 2 template before and after the change should give us some details 🙂
a
Before any changes
urgh, that's the sst start output.
Here's the good one before any changes
t
Does the build docker command output things into the build folder?
a
yeah
Ok, I'll double check a couple things then. Because now it uploaded everything. The issue might be somewhere else than sst afterall
f
Yeah a good way to debug this is to diff the CFN template, if the code changes were picked up the asset hash in the before and after templates should be different.
a
that's a good advice. I'll make sure to look into it.
I think the issue is surely the build output. It does get updated, but maybe not the way I intended it to.
Thanks guys. I'll ping back when I find what I missed.
You guys were right. The container image wasn't getting the latest code. SST was working as intended. That's a wrap folks! Thanks for being so responsive.
f
Awesome! Glad u r making progress 👍