https://serverless-stack.com/ logo
#guide
Title
# guide
t

Tomasz Sobczyk

09/24/2021, 8:30 PM
Yo! @Frank - spotted today that that if I follow the sst guide (with default language - javascript), when I try to deploy the whole thing for the first time i get this (after running npx sst start): Cannot find app handler. Make sure to add a "stacks/index.ts" file.
@Jay / @Frank / @thdxr - something you're aware of? or am I a muppet and I'm doing something terribly wrong?
t

thdxr

09/24/2021, 8:35 PM
Ah sorry about this, I had just updated the examples make our default folder
lib
->
stacks
I think the docs may not have been updated
How did you bootstrap your application?
t

Tomasz Sobczyk

09/24/2021, 8:36 PM
Following the guide, gimme a sec
t

thdxr

09/24/2021, 8:36 PM
I figured it out - I accidentally made everything look for a
.ts
file instead of a
.js
file - my Typescript evangelism has gone too far. Fixing it now
t

Tomasz Sobczyk

09/24/2021, 8:37 PM
Well, to be honest- as soon as I realized the project is full of js files - I switched to ts version as well - but still decided to raise it - so that other people don't fall into the trap 😄
and you know - maybe you wanna make ts version the default one 😄 (when no parameters are passed)
after switching to Typescript I'm struggling to find like literally any reason why you would want to use vanilla JS 😄
strong typing has saved me from ~1 billion bugs in the last few months 😄
t

thdxr

09/24/2021, 8:40 PM
I'm definitely on the extreme typescript side and I like doing weird things with types but I also get why people sometimes don't want to deal with the toolchain complexity (building, watching, etc)
t

Tomasz Sobczyk

09/24/2021, 9:04 PM
@thdxr - I tested the latest release - and there is still an issue
t

thdxr

09/24/2021, 9:04 PM
yeah I found it lol
t

Tomasz Sobczyk

09/24/2021, 9:04 PM
When I inspect the folder structure after running npx create-serverless-stack@latest my-app - it creates "lib" folder, instead of "stacks" folder
t

Tomasz Sobczyk

09/24/2021, 9:05 PM
I renamed lib to stacks manually -and works well afterwards - so that's the last missing bit 🙂
t

thdxr

09/24/2021, 9:05 PM
going too fast
t

Tomasz Sobczyk

09/24/2021, 9:06 PM
Well, price of being awesome is that you sometimes make small mistakes along the way 😄
😉
2 Views