Made more sense to post this here: What’s the rec...
# help
p
Made more sense to post this here: What’s the recommended project structure when using the 
sst.StackSite
 construct? I’m trying to deploy my CDK app with Seed, but I get an error when building the site because the node_modules for building the site are nested in another folder, and the build pipeline is trying to find it the project root
Copy code
├── sst.json
├── node_modules // <- my SST dependencies
├── package.json
├── stacks
│   ├── index.tx // <- creates stack for deploying static site in /apps/static-site
├── apps
│   ├── static-site
│   |   ├── package.json
│   |   ├── node_modules // <- my React dependencies
The error I’m getting is 
react-scripts:not found
 (it’s installed in the 
static-site
 folder, not the project root) (edited)
a
The practice I've seen and used is to put SST into apps/static-site, mingled with the app. SST is a devDependency.
f
Thanks @Adam Fanello!
@Patrick, we are putting together a sample repo for a mono-repo structure with both back and frontend https://github.com/serverless-stack/graphql-stack
It’s still work in progress, but the structure is pretty set.
To get your current setup work on Seed, you’d just have to add a
seed.yml
buildspec to run
npm/yarn install
inside your
static-site
directory, ie.
Copy code
before_build:
  - cd apps/static-site && npm install
You can read more about adding a buidlspec here https://seed.run/docs/adding-a-build-spec.html#seedyml