Wondering if something has changed in this behavio...
# help
g
Wondering if something has changed in this behavior? When defining an sst.Api, this works:
Copy code
routes: {
        'GET /': 'src/lambda.handler',
      },
I used to be able to do this:
Copy code
defaultFunctionProps: {
          srcPath: 'src',
     },
     routes: {
        'GET /': 'lambda.handler',
     },
but now, it throws an error:
Error: Cannot find a "tsconfig.json" in the function's srcPath: /src
f
Sorry @Guy Shechter, I must’ve missed this msg.
Were you using JS before and now switched to TS by any chance?
When using TS, SST looks for
tsconfig.json
at the
srcPath
. If
srcPath
is not provided, SST looks for it at the root.