the post-comments.ts Astro api endpoint returns a 500 in production on cloudflare pages. the response is always empty so the script probably crashes before even sending the response.
the error in the logs is about importing a library that doesn't exist in the project which makes me think there's a deeper node import in some dependency that crashes the process.
this is the cf pages logs entry of a post commenting request that returns a 500. there is no 'pages/api/path' mentioned anywhere in the project code:
{ "truncated": false, "executionModel": "stateless", "outcome": "ok", "scriptVersion": { "id": "9fb8df82-d328-467e-80a3-eb6ec5df5917" }, "scriptName": "pages-worker--5216587-production", "diagnosticsChannelEvents": [], "exceptions": [], "logs": [ { "message": [ "00:33:28 [ERROR] Error: No such module "pages/api/path".\n imported from "pages/api/post-comment.astro.mjs"" ], "level": "error", "timestamp": 1740184408188 } ], "eventTimestamp": 1740184408188, "event": { "request": { "url": "https://[domai