h3-session icon indicating copy to clipboard operation
h3-session copied to clipboard

`[nitro] [dev] [unhandledRejection]` Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they a re sent to the client

Open nopeless opened this issue 1 year ago • 8 comments

I haven't got a reproduction working on stackblitz, but here are the steps to do it (windows machine)

nuxi init yarn add h3-session copy paste the config in readme

then go to localhost:3000

The error will show in console

nopeless avatar Nov 29 '22 23:11 nopeless

Should be yarn add h3-session

wobsoriano avatar Nov 29 '22 23:11 wobsoriano

Should be yarn add h3-session

Ur right, was copying it using my eyes. Do you have a clue on why this is happening

nopeless avatar Nov 29 '22 23:11 nopeless

  • Operating System: Windows_NT
  • Node Version: v18.7.0
  • Nuxt Version: 3.0.0
  • Nitro Version: 1.0.0
  • Package Manager: [email protected]
  • Builder: vite
  • User Config: modules, ssr, session
  • Runtime Modules: h3-session/nuxt
  • Build Modules: -

heres npx nuxi info btw

nopeless avatar Nov 29 '22 23:11 nopeless

I'll try it on my windows machine later. Works as expected so far on Mac

wobsoriano avatar Nov 30 '22 01:11 wobsoriano

I'll try it on my windows machine later. Works as expected so far on Mac

Thats a bummer

Unfortunately it's really hard to debug compiled files on nuxt so I don't even know what the exact cause is

nopeless avatar Nov 30 '22 10:11 nopeless

I'm also having this issue, here's my nuxi info if that helps.


  • Operating System: Linux
  • Node Version: v18.10.0
  • Nuxt Version: 3.0.0
  • Nitro Version: 1.0.0
  • Package Manager: [email protected]
  • Builder: vite
  • User Config: modules, session, css, build, vite, nitro
  • Runtime Modules: h3-session/nuxt
  • Build Modules: -

rubennaatje avatar Nov 30 '22 19:11 rubennaatje

@rubennaatje thank you, I thought I was going crazy

nopeless avatar Nov 30 '22 20:11 nopeless

Would be nice to have a simple repo I can play with

BTW, there's https://github.com/wobsoriano/nuxt-iron-session

wobsoriano avatar Dec 01 '22 05:12 wobsoriano