vinash
12/20/2021, 7:49 PMTypeError: Cannot read properties of undefined (reading 'send')
at Object.send (/Users/********/Applications/notes/node_modules/@serverless-stack/core/dist/cli/FunctionBuilder.js:57:21)
at WS.handleRequest (/Users/********/Applications/notes/node_modules/@serverless-stack/cli/scripts/start.js:253:21)
at WS.<anonymous> (/Users/********/Applications/notes/node_modules/@serverless-stack/core/dist/runtime/ws.js:100:41)
at Generator.next (<anonymous>)
at /Users/********/Applications/notes/node_modules/@serverless-stack/core/dist/runtime/ws.js:8:71
at new Promise (<anonymous>)
at __awaiter (/Users/********/Applications/notes/node_modules/@serverless-stack/core/dist/runtime/ws.js:4:12)
at WS.handleMessage (/Users/********/Applications/notes/node_modules/@serverless-stack/core/dist/runtime/ws.js:62:16)
at WebSocket.<anonymous> (/Users/********/Applications/notes/node_modules/@serverless-stack/core/dist/runtime/ws.js:59:49)
at WebSocket.emit (node:events:390:28)
Then when I run "sst start" again everything works just fine. And that sst start from the commandline states that no changes were deployed.
If I add another api when sst start is not running and then do sst start which triggers the deployment everything works fine as well.
So it seems like there is some state in memory in the local development server that doesn't work well when adding new API's.
Any ideas what's causing this?Frank
function send(id, event) {
const func = ctx.funcs[id];
return func.send(event);
}
Can you think of any corner where the function isn’t in ctx
?thdxr
12/22/2021, 12:30 PMthdxr
12/22/2021, 12:30 PMvinash
12/22/2021, 10:11 PMFrank
thdxr
12/27/2021, 11:58 PM