Skip to content

v15.5.x not working on Webcontainers #1978

Open

Description

@manarbenkraouda

Describe the bug

## 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)
Image

Link to the blitz that caused the error

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

Steps 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)

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

Parity with Local

Screenshots

No response

Platform

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

Additional context

No response

Activity

  1. jaypyles commented on Jan 30, 2026

    @jaypyles

    Did you find a workaround for this @manarbenkraouda? I am trying to use webcontainers to display various versions of Next.js apps, and anything above 15.4.7 gets this error. I can't just downgrade apps to 15.4.7 because of the CVE associated with the version.

  2. jaypyles commented on Feb 5, 2026

    @jaypyles

    @SamVerschueren I'm seeing this same issue in Next 16 apps as well, any updates?

  3. manarbenkraouda commented on Feb 6, 2026

    @manarbenkraouda
    Author

    Hey @jaypyles thanks for upping this.

    If anyone from stackblitz reading this, I haven't really used Bolt since I opened this issue. It's a huge blocker for me not being able to work on most up to date versions of Next.js. I'd love to get back working on Bolt for my customer's projects but I can't.

    I'm not pressing anyone though, I know this issue might be complicated as hell. I guess it's linked to the WASM build of SWC or something like this (I didn't investigate at all).

    On the other hand, doesn't it feel weird that no one else is complaining about this problem? I can't believe people still use next 14 or even 13 on Bolt, seems surreal to me.

    Best,

  4. SamVerschueren commented on Feb 17, 2026

    @SamVerschueren
    Contributor

    Thanks for raising this issue. I've raised this issue internally but for now that's all I can do. I'm not the person going over the priorities so I can't give you any more information for now.

  5. jaypyles commented on Feb 17, 2026

    @jaypyles

    @manarbenkraouda looks like 15.3.9 works in Bolt/webcontainers, so I have been using and downgrading projects that are created via it.

    @SamVerschueren thanks for the response.

  6. Schenk0 commented on Mar 6, 2026

    @Schenk0

    Hey @SamVerschueren, Any update on this?

  7. hasnainsaad93 commented on Mar 6, 2026

    @hasnainsaad93

    I updated all the configs and update dependencies through bolt.new and its preview is throwing this error. Though working on local. Definitely something related to their own infra

  8. AllanJard commented on Oct 7, 2026

    @AllanJard

    Any chance of an update on this issue? I've hit it with Next 16.4 as well. Pinning to 15.4.11 appears to allow it to work (albeit not on Firefox).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions