Newbie needs help.... I have simply followed instr...
# sst
e
Newbie needs help.... I have simply followed instructions to install the rest-api example using
npx create-serverless-stack@latest --example rest-api sst-test2
and then cd and do npm run start it deploys the debug stack and then fails beore deploying the app stack saying:
Cannot find app handler. Make sure to add a "lib/index.js" file.
There is indeed no such file in the sample. There is a stacks folder instead which is being referred to in sst.json. Is /lib' a hardcoded dependency??
r
There's a property in sst.json called main where you can specify where your stacks live. Might be a legacy bug in the starter example from when that folder was called lib
e
And what's really odd is that I did the same thing a few days ago and it worked ok
My sst.json does indeed contain
"main": "stacks/index.js"
no reference to lib whatsoever
r
Curious, one for @Frank or @thdxr
e
Thanks for the quick reaction @Ross Coundon, I guess it should be super simple to reproduce and make sure it's not an environmental artifact on my end.
t
I'll take a look in a few min
this might be an issue on our side because we did some bulk renaming and might have missed something
ah the issue is the version of sst referenced in the templates in package.json is extremely old
if you update @serverless-stack/cli and @serverelss-stack/resources it should work. We need to fix this thanks for finding the issue
e
Thanks, that did it !
s
just ran up against this issue as well
f
Hey @Seth Geoghegan did updating cli and resources solve it for u?
s
It did!
Sorry, I should have added that 🙂
f
Just wanted to make sure of that 👍