vvo / iron-session

🛠 Secure, stateless, and cookie-based session library for JavaScript

Home Page:https://get-iron-session.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: res.getHeader is not a function

mauro-balades opened this issue · comments

TypeError: res.getHeader is not a function
    at addToCookies (webpack-internal:///(rsc)/./node_modules/iron-session/dist/index.mjs:104:39)
    at Object.save (webpack-internal:///(rsc)/./node_modules/iron-session/dist/index.mjs:79:21)
- error node_modules/iron-session/dist/index.mjs (112:36) @ getHeader
- error unhandledRejection: Error [TypeError]: res.getHeader is not a function
    at addToCookies (webpack-internal:///(rsc)/./node_modules/iron-session/dist/index.mjs:104:39)
    at Object.save (webpack-internal:///(rsc)/./node_modules/iron-session/dist/index.mjs:79:21) {
  digest: undefined
}

Exactly the same problem for me. I'm trying to switch from AWS Amplify, which is catastrophic but works, to SST, which produces this problem.

Hey there, iron-session v8 is live now 👍 https://github.com/vvo/iron-session. This issue may no longer be relevant. If it is please open a new issue with a reproduction. Thanks!

(if this is specific to SST you may want to open an issue there, thanks)