sveltekit-adapter-aws icon indicating copy to clipboard operation
sveltekit-adapter-aws copied to clipboard

Internal Server Error

Open KieranFleckney opened this issue 2 years ago • 5 comments

Describe the bug returning a {"message":"Internal Server Error"} from endpoint. When looking into the cloudwatch log for the LambdaServerFunctionHandler I see this error message.

2023-01-23T17:30:08.537Z	8816fa08-9a0d-4ebe-a0eb-af67d0e9e627	ERROR	Invoke Error 	
{
    "errorType": "TypeError",
    "errorMessage": "Cannot read properties of undefined (reading 'prerendering')",
    "stack": [
        "TypeError: Cannot read properties of undefined (reading 'prerendering')",
        "    at respond (/var/task/index.js:32726:21)",
        "    at Server.respond (/var/task/index.js:32998:12)",
        "    at Runtime.handler (/var/task/index.js:33042:33)"
    ]
}

To Reproduce Followed the instruction on the ReadMe file and then just ran npm run build

Expected behavior Well I would expected to see my app return

Additional context All the cloudformation deploys okay and nothing is failing that I can see. Could you please help provide an idea to why this is happening?

KieranFleckney avatar Jan 23 '23 17:01 KieranFleckney

Update:

From "@sveltejs/kit": "1.0.13" this error seems to occur. Plus to add onto this versions 1.00 -> 1.0.12 cause the same issues as #19

KieranFleckney avatar Jan 24 '23 10:01 KieranFleckney

Yeah, I have the same problem. For now I downgraded @sveltejs/kit to 1.0.1 because I need the website to work

pippo311lp avatar Jan 25 '23 10:01 pippo311lp

I have the same issue. Did anybody figure out what the problem is? I'm happy to help but I'm not sure where to begin.

StephanPitois avatar Feb 02 '23 22:02 StephanPitois

Found out what caused it, it's fixed at #23 .

coveres avatar Feb 03 '23 18:02 coveres

The same problem here with @sveltejs/kit 1.5.0.

dominikfehn avatar Feb 09 '23 10:02 dominikfehn