Just starting going through the guide, and I'm get...
# help
i
Just starting going through the guide, and I'm getting a really weird error in the Create a Hello World API. When running the
npx sst start
command, I get the following error/stack trace (replacing stuff specific to my operating system with
os-stuff
):
Copy code
/os-stuff/notes/node_modules/@serverless-stack/cli/scripts/start.js:308
        result.error.stackTrace?.join("\n")
                                ^

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:1047:16)
    at Module._compile (internal/modules/cjs/loader.js:1097:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
    at Module.load (internal/modules/cjs/loader.js:977:32)
    at Function.Module._load (internal/modules/cjs/loader.js:877:14)
    at Module.require (internal/modules/cjs/loader.js:1019:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/os-stuff/notes/node_modules/@serverless-stack/cli/bin/scripts.js:59:16)
    at Module._compile (internal/modules/cjs/loader.js:1133:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
I've done very little so far, just ran the
npx create-serverless-stack@latest notes
command, `cd`'d into the directory, and changed the region to
us-west-2
. I did just update npm in case that affects anything. Any assistance would be greatly appreciated! Thanks!
g
Pretty sure I saw someone else post this exact error - if I recall correctly you just need to upgrade to node v14+
t
^ yep that's the solution - I thought fewer people would be on node12
i
Oh, that makes a lot of sense. The machine I'm on is a little long-in-the-tooth, and it's been awhile since I've updated node.
t
I should just remove the optional chaining from that line
i
Thanks for the quick reply!