https://serverless-stack.com/ logo
#help
Title
# help
j

Jackson Bowe

03/15/2022, 5:46 AM
Hi guys, I've just started using SST and have run into some trouble following the Quick Start steps shown on Github. When I try to run npx sst start it just prints out the aws-cdk help notes.
Copy code
PS D:\Projects\Mafia\my-sst-app> npx sst start
Using stage: dev
Preparing your SST app

=======================
 Deploying debug stack
=======================

Usage: cdk -a <cdk-app> COMMAND

Commands:
  cdk.js list [STACKS..]             Lists all stacks in the app   [aliases: ls]
  ... more of the same
  ... more of the same
If your app has a single stack, there is no need to specify the stack name

If one of cdk.json or ~/.cdk.json exists, options specified there will be used
as defaults. Settings in cdk.json take precedence.

There was an error synthesizing your app.
PS D:\Projects\Mafia\my-sst-app>
Best guess is that
npx sst start
isn't providing any commands when calling
cdk
. I'd appreciate any assistance with this because it's got me pretty confused 😄 Cheers
m

Mirza

03/15/2022, 6:16 AM
Are you sure you are in the right folder? Perhaps check that you have the following within D\Projects\Mafia\my sst app
Copy code
src
stacks
sst.json
package.json
.env
j

Jackson Bowe

03/15/2022, 6:24 AM
I've done the exact same steps on another machine just now and it's working properly.
Can't for the life of me figure out what is different
@Frank any ideas regarding this issue?
f

Frank

03/16/2022, 6:42 PM
Hey @Jackson Bowe can you share ur package.json?
Also which command did u use to create create the app?
j

Jackson Bowe

03/18/2022, 12:07 AM
package.json looks like this
Copy code
{
  "name": "my-sst-app",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "test": "sst test",
    "start": "sst start",
    "build": "sst build",
    "deploy": "sst deploy",
    "remove": "sst remove"
  },
  "eslintConfig": {
    "extends": [
      "serverless-stack"
    ]
  },
  "dependencies": {
    "@serverless-stack/cli": "0.69.0",
    "@serverless-stack/resources": "0.69.0",
    "aws-cdk-lib": "2.15.0"
  }
}
Command I ran was
npx create-serverless-stack@latest my-sst-app
@Frank worth noting. On my main PC I can't run
npx sst start
because of above error. But on a random laptop I had around, it worked fine.
f

Frank

03/18/2022, 10:32 AM
oh hmm.. is that random laptop running Windows as well?
Btw, @Jackson Bowe could u give
0.69.2
a try? I just fixed a Windows specific issue. Could be related to this 🤔
U can just change
0.69.0
for both the
cli
and
resources
dependencies to
0.69.2
and then
npm/yarn install
Let me know if it works.
j

Jackson Bowe

03/20/2022, 1:27 AM
@Frank howdy, finally got a chance to test it today and the issue is fixed. You're a legend ❤️. Out of curiosity, what was the windows issue that you fixed?
f

Frank

03/22/2022, 5:32 AM
@Jackson Bowe recently SST updated from AWS CDK v2.7.0 to v2.15.0. And CDK made a change to their binary file and this no longer works on Windows:
Copy code
./bin/cdk
Instead we had to invoke it like this
Copy code
node bin/cdk
Linux wasn’t affected 😔
j

Jackson Bowe

03/22/2022, 5:34 AM
Yeah that's really strange though because it worked perfectly on my other windows machine. Anyway, it's working now (currently using 🙂 ) so I won't complain 😄
46 Views