Adrian Schweizer
03/25/2022, 11:11 PMAdrian Schweizer
03/25/2022, 11:12 PM2022-03-25T23:00:23.731Z undefined ERROR Uncaught Exception
{
"errorType": "Runtime.UserCodeSyntaxError",
"errorMessage": "SyntaxError: Unexpected token '?'",
"stack": [
"Runtime.UserCodeSyntaxError: SyntaxError: Unexpected token '?'",
" at _loadUserApp (/var/runtime/UserFunction.js:98:13)",
" at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)",
" at Object.<anonymous> (/var/runtime/index.js:43:30)",
" at Module._compile (internal/modules/cjs/loader.js:999:30)",
" at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)",
" at Module.load (internal/modules/cjs/loader.js:863:32)",
" at Function.Module._load (internal/modules/cjs/loader.js:708:14)",
" at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)",
" at internal/main/run_main_module.js:17:47"
]
}
Adrian Schweizer
03/25/2022, 11:13 PMAdrian Schweizer
03/25/2022, 11:18 PMAdrian Schweizer
03/25/2022, 11:23 PMserve -s build
Adrian Schweizer
03/25/2022, 11:26 PMthdxr
03/25/2022, 11:44 PMthdxr
03/25/2022, 11:44 PMAdrian Schweizer
03/25/2022, 11:46 PMAdrian Schweizer
03/25/2022, 11:47 PMAdrian Schweizer
03/25/2022, 11:47 PMAdrian Schweizer
03/25/2022, 11:47 PMthdxr
03/25/2022, 11:47 PMapp.setDefaultFunctionProps({
runtime: "nodejs14.x",
})
thdxr
03/25/2022, 11:47 PMAdrian Schweizer
03/25/2022, 11:49 PMimport StorageStack from "./StorageStack";
import ApiStack from "./ApiStack";
import FrontendStack from "./FrontendStack";
export default function main(app) {
const storageStack = new StorageStack(app, "storage");
const apiStack = new ApiStack(app, "api", {
table: storageStack.table,
});
new FrontendStack(app, "frontend", {
api: apiStack.api,
bucket: storageStack.bucket,
});
}
Adrian Schweizer
03/25/2022, 11:55 PMapp.setDefaultFunctionProps({
runtime: "nodejs14.x",
});
Adrian Schweizer
03/26/2022, 12:02 AMthdxr
03/26/2022, 12:05 AM