Hi Guys, <@U01JVDKASAC> <@U022L3U3W75> hoping to ...
# help
j
Hi Guys, @Frank @Jay hoping to get help from you guys. I tried deleting the project and re-ran these commands and I still get the same error. I ran
Copy code
npx create-serverless-stack@latest notes
cd notes
npx sst start
Then I get this error:
Copy code
/.../Serverless/my-sst-app/node_modules/@aws-cdk/core/lib/stack.js:78
            throw new Error(`Stack name must match the regular expression: ${VALID_STACK_NAME_REGEX.toString()}, got '${this.stackName}'`);
            ^

Error: Stack name must match the regular expression: /^[A-Za-z][A-Za-z0-9-]*$/, got '1dmg-my-sst-app-debug-stack'
    at new Stack (.../Desktop/Serverless/my-sst-app/node_modules/@aws-cdk/core/lib/stack.js:78:19)
    at new DebugStack (/.../Serverless/my-sst-app/node_modules/@serverless-stack/cli/assets/debug-stack/lib/DebugStack.js:11:5)
    at Object.<anonymous> (/.../Serverless/my-sst-app/node_modules/@serverless-stack/cli/assets/debug-stack/bin/index.js:25:15)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
    at internal/main/run_main_module.js:17:47
There was an error synthesizing your app.
n
Hey just eyeballing that regex, i think you can't start the stack name with a number, could you get rid of the 1 before dmg?
m
can you show your
sst.json
file @Jeff Cordova
j
hi @manitej, please see attached file. It's just the default file that was created. I didn't update/edit it as well. Thank you.
m
is your stage name is
1dmg
?
j
yes.
that's what I set the 1st run
m
SST makes the stack name as
stage-name
+
app_name
+
debug-stack
, stack name shouldn’t start with a number, so if you’re naming your stage as
1dmg
its going to start with a number and the regex breaks. try changing the stage name to something else
npx sst start --stage dev
j
thank you. I will try that and give you an update. Appreciate your time Manitej. :)
m
sounds good! tag me if you face issues anytime 🙂
j
hi @manitej it worked! Thank you so much for your help!