Ross Coundon
08/24/2021, 1:23 PMaccessLog: true
in the snippet below we get the error:
TypeError: Cannot read property 'api' of undefined
at Object.buildAccessLogData (/home/jamin/Code/OFSC-forms-PDFify/node_modules/@serverless-stack/resources/src/util/apiGatewayV2AccessLog.ts:79:54)
at new Api (/home/jamin/Code/OFSC-forms-PDFify/node_modules/@serverless-stack/resources/src/Api.ts:217:45)
at new PdflifierStack (/home/jamin/Code/OFSC-forms-PDFify/lib/PdflifierStack.ts:97:17)
at Object.main (/home/jamin/Code/OFSC-forms-PDFify/lib/index.ts:13:3)
at Object.<anonymous> (/home/jamin/Code/OFSC-forms-PDFify/.build/run.js:89:16)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
There was an error synthesizing your app.
It goes away if we set it to false.
Any thoughts on what's going on here?thdxr
08/24/2021, 1:24 PMRoss Coundon
08/24/2021, 1:27 PMsst start --stage local --increase-timeout
Ross Coundon
08/24/2021, 1:32 PMthdxr
08/24/2021, 1:41 PMthdxr
08/24/2021, 1:41 PMthdxr
08/24/2021, 1:42 PMBen Gooding
08/24/2021, 1:43 PM"@serverless-stack/cli": "0.40.1",
"@serverless-stack/resources": "0.40.1",
thdxr
08/24/2021, 1:50 PMaccessLog === false
thdxr
08/24/2021, 1:54 PMthdxr
08/24/2021, 1:57 PMthdxr
08/24/2021, 1:58 PMcreateDefaultStage: false
ok. @Ross Coundon @Ben Gooding the access log currently looks for the default stage and since it's turned off that's why it's erroringRoss Coundon
08/24/2021, 1:58 PMRoss Coundon
08/24/2021, 2:00 PMthdxr
08/24/2021, 2:01 PMthdxr
08/24/2021, 2:02 PMthdxr
08/24/2021, 2:02 PMthdxr
08/24/2021, 2:03 PMRoss Coundon
08/24/2021, 2:04 PMnew HttpStage(this, 'Stage', {
httpApi: api.httpApi,
stageName,
autoDeploy: true,
});
thdxr
08/24/2021, 2:05 PMstages
prop to api so you can create it inline and accessLog: true can create one for each stagethdxr
08/24/2021, 2:05 PMRoss Coundon
08/24/2021, 2:08 PMthdxr
08/24/2021, 2:15 PMthdxr
08/24/2021, 2:15 PMRoss Coundon
08/24/2021, 2:16 PM