supabase-community / vercel-ai-chatbot

A full-featured, Supabaseified Next.js AI chatbot built by Vercel Labs & Supabase
https://github.com/thorwebdev/vercel-ai-chatbot/pull/1
Other
577 stars 88 forks source link

Error: Invariant: Method expects to have requestAsyncStorage, none available #14

Closed Aaryan6 closed 10 months ago

Aaryan6 commented 1 year ago

Bug report

Describe the bug

image

I got this error after forking the repo and running the command 'npm run dev', I have installed all the packages, and set the values in env.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. npm run dev

System information

dagryl commented 11 months ago

Did you solve the problem?

Aaryan6 commented 11 months ago

Did you solve the problem?

Yes I did!, but I forgot to post here

It is caused by this export const runtime = 'edge'

In windows it should be export const runtime = 'nodejs'

Maybe there are 4 files where you need to change this,

but I don't know why 🫤

dagryl commented 11 months ago

Upgrading to "next": "14.0.3" solved the problem for me.

Aaryan6 commented 11 months ago

Do you use Mac or windows?

dagryl commented 11 months ago

Windows

Aaryan6 commented 10 months ago

By changing the runtime from 'edge' to 'nodejs', everything is working!