You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Node 18 introduced Fetch API Response. When using it with Astro on Vercel, it fails with error:
{
"errorType": "Runtime.UnhandledPromiseRejection",
"errorMessage": "TypeError: response.headers.raw is not a function",
"reason": {
"errorType": "TypeError",
"errorMessage": "response.headers.raw is not a function",
"stack": [
"TypeError: response.headers.raw is not a function",
" at setResponse (file:///var/task/node_modules/@astrojs/vercel/dist/serverless/request-transform.js:61:46)",
" at Server.handler (file:///var/task/node_modules/@astrojs/vercel/dist/serverless/entrypoint.js:22:11)",
" at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"
]
},
"promise": {},
"stack": [
"Runtime.UnhandledPromiseRejection: TypeError: response.headers.raw is not a function",
" at process.<anonymous> (file:///var/runtime/index.mjs:1194:17)",
" at process.emit (node:events:525:35)",
" at process.emit (node:domain:489:12)",
" at emit (node:internal/process/promises:149:20)",
" at processPromiseRejections (node:internal/process/promises:283:27)",
" at process.processTicksAndRejections (node:internal/process/task_queues:96:32)"
]
}
What version of
astro
are you using?1.6.10
Are you using an SSR adapter? If so, which one?
Vercel
What package manager are you using?
yarn
What operating system are you using?
Linux
Describe the Bug
Node 18 introduced Fetch API Response. When using it with Astro on Vercel, it fails with error:
This is likely due to Vercel adapter using
headers.raw()
, not available on the Web API Headers class.Is there a reason
.raw()
call is required?Link to Minimal Reproducible Example
TBD
Participation
The text was updated successfully, but these errors were encountered: