Bun with Next js latest error: Invariant: Render expects to have requestAsyncStorage, none found
Unanswered
Fire ant posted this in #help-forum
Fire antOP
Just installed nextjs latest using bun, 1st start it was compiled wih start page, when i refresh page it shows
I'm using WSL, is this Bun related problem or latest next js?
error: Invariant: Render expects to have requestAsyncStorage, none foundI'm using WSL, is this Bun related problem or latest next js?
23 Replies
can you try without bun
as bun isn't that stable with nextjs yet
Does bun even work with nextjs? IIRC bun doesnt even run nextjs. Instead node gets called which handles that
You can still use bun to install stuff tho
@riský can you try without bun
Fire antOP
it works on npm, its Bun issue...maybe not stable yet
@Clown Does bun even work with nextjs? IIRC bun doesnt even run nextjs. Instead node gets called which handles that
thats because nextjs currently uses some weird node apis that bun doesnt have iirc ..
But bun doesnt even run next
@Clown You can still use bun to install stuff tho
but as they are using wsl, they shouldn't... (io speeds are horrible for wsl)
@Fire ant it works on npm, its Bun issue...maybe not stable yet
yes... it isn't stable...
The Next.js App Router currently relies on Node.js APIs that Bun does not yet implement. The guide below uses Bun to initialize a project and install dependencies, but it uses Node.js to run the dev server.
https://bun.sh/guides/ecosystem/nextjs
@riský but as they are using wsl, they shouldn't... (io speeds are horrible for wsl)
Bun doesnt install very fast for me in native linux either
@Fire ant it works on npm, its Bun issue...maybe not stable yet
have you ended up getting it to work or use node like normal?
@Fire ant Just installed nextjs latest using bun, 1st start it was compiled wih start page, when i refresh page it shows
error: Invariant: Render expects to have requestAsyncStorage, none found
I'm using WSL, is this Bun related problem or latest next js?
Giant resin bee
hi. i work on bun. this has been a known issue by me for a while
i think i just fixed it :)
i think i just fixed it :)
YAY
@Giant resin bee hi. i work on bun. this has been a known issue by me for a while
i think i just fixed it :)
when should we see this fix? (ie when is next release)
Crazy ant
from what i know, if you want to run nextjs using bun, the command will be like this
bun run dev --use-bunYeah but we need @Giant resin bee's fix so that it doesn't die (idk if it has been applied tho)
we currently respect if a package has !#/usr/bin/env node
--bun to bun will ignore
--bun to bun will ignore
@riský Yeah but we need <@244905301059436545>'s fix so that it doesn't die (idk if it has been applied tho)
Giant resin bee
also unfortunately i got the big issue on app dir but extensive testing found more issues so 1.0.4 might work but i wouldn't say "it works" yet
but soonâ„¢ï¸
i got side tracked doing some other features this week
but soonâ„¢ï¸
i got side tracked doing some other features this week
Giant resin bee
not stable enough to be considered "working" imo
got a list of things to fix that were revealed after ipc stuff so i say i may have spoken too soon
got a list of things to fix that were revealed after ipc stuff so i say i may have spoken too soon
i think in the canary release it might work but under load and larger projects have issues still
nice... i didn't realise nextjs was so chaotic