nextjs - 💡(How to fix) Fix v15.5.x not working on Webcontainers [5 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#84026Fetched 2026-04-08 02:20:50
View on GitHub
Comments
5
Participants
2
Timeline
13
Reactions
1
Assignees
Timeline (top)
commented ×5subscribed ×4assigned ×1issue_type_added ×1

Error Message

Invariant: Expected workUnitAsyncStorage to have a store. This is a bug in Next.js.

Next.js version: 15.5.3 (Webpack)


<img width="714" height="397" alt="Image" src="https://github.com/user-attachments/assets/755e030a-baf1-42d7-a874-6831cda935e8" />

# Expected behavior

None actually, I though it would be good to document in case other people encounter this issue while working on Webcontainer environments such as Bolt.new. I couldn't fine anything related to this issue as of 2025-09-20

Code Example

## Error Type
Runtime InvariantError

## Error Message
Invariant: Expected workUnitAsyncStorage to have a store. This is a bug in Next.js.

Next.js version: 15.5.3 (Webpack)

---

## Error Type
Runtime InvariantError

## Error Message
Invariant: Expected workUnitAsyncStorage to have a store. This is a bug in Next.js.

Next.js version: 15.5.3 (Webpack)

---

Operating System:
  Platform: linux
  Arch: x64
  Version: Ubuntu 20.04.0 LTS Sat Sep 20 2025 20:09:44 GMT+0200 (heure d’été d’Europe centrale)
  Available memory (MB): NaN
  Available CPU cores: 8
Binaries:
  Node: 20.19.1
  npm: 10.8.2
  Yarn: 1.22.19
  pnpm: 8.15.6
Relevant Packages:
  next: 15.5.3 // Latest available version is detected (15.5.3).
  eslint-config-next: N/A
  react: 19.1.1
  react-dom: 19.1.1
  typescript: 5.9.2
Next.js Config:
  output: N/A
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://stackblitz.com/edit/nextjs-15-broken-on-webcontainers?file=package.json

To Reproduce

  1. Visit the Stackblitz project
  2. Run the app
  3. See this error message:
## Error Type
Runtime InvariantError

## Error Message
Invariant: Expected workUnitAsyncStorage to have a store. This is a bug in Next.js.

Next.js version: 15.5.3 (Webpack)

Current vs. Expected behavior

Current behavior:

## Error Type
Runtime InvariantError

## Error Message
Invariant: Expected workUnitAsyncStorage to have a store. This is a bug in Next.js.

Next.js version: 15.5.3 (Webpack)
<img width="714" height="397" alt="Image" src="https://github.com/user-attachments/assets/755e030a-baf1-42d7-a874-6831cda935e8" />

Expected behavior

None actually, I though it would be good to document in case other people encounter this issue while working on Webcontainer environments such as Bolt.new. I couldn't fine anything related to this issue as of 2025-09-20

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: Ubuntu 20.04.0 LTS Sat Sep 20 2025 20:09:44 GMT+0200 (heure d’été d’Europe centrale)
  Available memory (MB): NaN
  Available CPU cores: 8
Binaries:
  Node: 20.19.1
  npm: 10.8.2
  Yarn: 1.22.19
  pnpm: 8.15.6
Relevant Packages:
  next: 15.5.3 // Latest available version is detected (15.5.3).
  eslint-config-next: N/A
  react: 19.1.1
  react-dom: 19.1.1
  typescript: 5.9.2
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Not sure

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

Version 15.4.1 work perfectly fine.

extent analysis

TL;DR

Downgrade Next.js to version 15.4.1 as a temporary workaround to resolve the InvariantError.

Guidance

  • The error message indicates a bug in Next.js, specifically with workUnitAsyncStorage, which suggests a version-specific issue.
  • Since version 15.4.1 is reported to work perfectly fine, downgrading to this version may mitigate the problem.
  • Verify the fix by running the app after downgrading Next.js and checking for the absence of the InvariantError.
  • Consider monitoring the Next.js issue tracker or release notes for a future version that addresses this bug.

Example

No code snippet is provided as the issue is related to a version-specific bug in Next.js.

Notes

The provided information does not specify the exact cause of the bug, but downgrading to a known working version (15.4.1) can serve as a temporary workaround.

Recommendation

Apply workaround: Downgrade Next.js to version 15.4.1, as it is reported to work without the InvariantError issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING