Hey all I'm having some trouble getting started wi...
# help
p
Hey all I'm having some trouble getting started with SST. I'm new to it all and just trying to get a basic example project going. @Frank @Jay I'm going through the nextjs-app example and when I try to start the dev environment i keep getting this error:
Copy code
file:///C:/Users/User/source/sst/nextjs-app/.build/lib/index.js:20
var site = new NextjsSite(stack, "Site", {
           ^

ReferenceError: NextjsSite is not defined
    at file:///C:/Users/User/source/sst/nextjs-app/.build/lib/index.js:20:12
    at ModuleJob.run (node:internal/modules/esm/module_job:197:25)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:337:24)
    at async file:///C:/Users/User/source/sst/nextjs-app/node_modules/@serverless-stack/cli/assets/debug-stack/bin/index.mjs:20:17
I also tried the react example on the site, but it does not seem to create the correct folders referenced in the example - the backend/ folder is missing..
a
You have to import it from
@serverless-stack/resources
Copy code
import { NextjsSite } from '@serverless-stack/resources';
p
Thats not in the code in the tutorial.. are the examples outdated / broken ? https://serverless-stack.com/examples/how-to-create-a-nextjs-app-with-serverless.html
a
Seems to be an error, the snippet under "Add the table" seems to import ReactStaticSite instead of NextjsSite
@thdxr While you are updating tutorials 🙂 might also want to take a look at this above
f
Sorry about the confusion. The tutorial has been updated.