Next.js Discord

Discord Forum

Invariant: headers() expects to have requestAsyncStorage, none available

Answered
AM posted this in #help-forum
Open in Discord
AMOP
Minimal reproducible repo:

https://stackblitz.com/edit/nextjs-ztte2q?file=package.json

Hello i'm trying to prep some demo and locally is working fine but when trying in stackblitz fails with: Invariant: headers() expects to have requestAsyncStorage, none available any idea what can be the issue, i even created server action but didn't manage to solve it
Answered by Ray
have you tried codesandbox?
View full answer

5 Replies

AMOP
awwww 😢 is there any other tool similar to stack blitz where i can create && share reproducible examples
Answer
@Ray have you tried codesandbox?
AMOP
nah will try in a bit and share
AMOP
yeah can confirm works successfully 🥳

https://codesandbox.io/p/devbox/patient-snowflake-66cckf