Skip to content

Vite dev server fails to start in WebContainer with RangeError: Invalid atomic access index #2104

Closed

Description

@yMeeraki

Describe the bug

When running a fresh Vite React project inside StackBlitz WebContainer, the dev server fails to start. During startup, Rollup downloads @rollup/binding-wasm32-wasi and then crashes with:

RangeError: Invalid atomic access index
worker (tid = 43) sent an error: Invalid atomic access index

As a result, the application never starts and StackBlitz displays "Failed to run start command".

Link to the blitz that caused the error

https://stackblitz.com/edit/vitejs-vite-zzm2vchz?file=README.md

Steps to reproduce

  1. Open the StackBlitz project:
    https://stackblitz.com/edit/vitejs-vite-zzm2vchz?file=README.md
  2. Open the terminal.
  3. Run:
    npm install
    npm run dev
  4. Wait for Vite to start.
  5. Observe the error:
    RangeError: Invalid atomic access index

and the dev server fails to launch.

Expected behavior

The Vite development server should start successfully and display the application preview without any errors.

Parity with Local

Screenshots

Image

Platform

Browser name  = Chrome
Full version  = 149.0.0.0
Major version = 149
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36
performance.memory = {
  "totalJSHeapSize": 85685936,
  "usedJSHeapSize": 56922380,
  "jsHeapSizeLimit": 4230479872
}
Hash = bd880c29

Additional context

Error occurs after Rollup downloads @rollup/binding-wasm32-wasi.

Node.js version reported by WebContainer:
v22.22.0

StackBlitz UI shows:
"Failed to run start command"

Relevant error:

RangeError: Invalid atomic access index
worker (tid = 43) sent an error: Invalid atomic access index

Activity

  1. bolt-new-by-stackblitz commented on Jun 3, 2026

    @bolt-new-by-stackblitz
  2. jspanoeddson commented on Jun 8, 2026

    @jspanoeddson

    any word on a fix for this? all my projects are failing now because of this exact error.

    node:30) ExperimentalWarning: WASI is an experimental feature and might change at any time
    (Use node --trace-warnings ... to show where the warning was created)
    (node:30) ExperimentalWarning: WASI is an experimental feature and might change at any time
    (Use node --trace-warnings ... to show where the warning was created)
    worker (tid = 43) sent an error! Invalid atomic access index
    RangeError: Invalid atomic access index
    at Object.storeSizeTypeValue (/tmp/rolldown-1.0.0-rc.11/node_modules/.pnpm/@emnapi+core@1.11.0/node_modules/@emnapi/core/dist/emnapi-core.cjs.js:1218:29)
    at Object.pushQueue (/tmp/rolldown-1.0.0-rc.11/node_modules/.pnpm/@emnapi+core@1.11.0/node_modules/@emnapi/core/dist/emnapi-core.cjs.js:990:28)
    at eval (/tmp/rolldown-1.0.0-rc.11/node_modules/.pnpm/@emnapi+core@1.11.0/node_modules/@emnapi/core/dist/emnapi-core.cjs.js:1040:36)
    at Object.execute (/tmp/rolldown-1.0.0-rc.11/node_modules/.pnpm/@emnapi+core@1.11.0/node_modules/@emnapi/core/dist/emnapi-core.cjs.js:1094:36)
    at Object.push (/tmp/rolldown-1.0.0-rc.11/node_modules/.pnpm/@emnapi+core@1.11.0/node_modules/@emnapi/core/dist/emnapi-core.cjs.js:1029:33)
    at napi_call_threadsafe_function (/tmp/rolldown-1.0.0-rc.11/node_modules/.pnpm/@emnapi+core@1.11.0/node_modules/@emnapi/core/dist/emnapi-core.cjs.js:1612:31)

    Node.js v22.22.0

  3. yMeeraki commented on Jun 8, 2026

    @yMeeraki
    Author

    No, it’s not fixed for me either. I'm seeing the same error across multiple projects, not just this Vite React example.

    I haven't made any changes to my setup, and projects that were previously working are now failing with:

    RangeError: Invalid atomic access index
    worker (tid = 43) sent an error: Invalid atomic access index
    

    Since other users are also reporting the same behavior, this appears to be a broader WebContainer/runtime issue rather than something specific to a single project configuration.

  4. jspanoeddson commented on Jun 8, 2026

    @jspanoeddson

    yeah it's affecting all my projects that use vite 8/react 6. not sure which is the issue, but my older projects that are on vite 5 seem to be fine still

  5. channyeintun commented on Jun 9, 2026

    @channyeintun

    No, it’s not fixed for me either. I'm seeing the same error across multiple projects, not just this Vite React example.

    I haven't made any changes to my setup, and projects that were previously working are now failing with:

    RangeError: Invalid atomic access index
    worker (tid = 43) sent an error: Invalid atomic access index
    

    Since other users are also reporting the same behavior, this appears to be a broader WebContainer/runtime issue rather than something specific to a single project configuration.

    The exact same issue happens in my project too.
    It seems to be the problem with Vite 8 on Chromium 149. It was working fine on 148.

  6. jspanoeddson commented on Jun 9, 2026

    @jspanoeddson

    yeah it seems to be just 8. I have an older project on 5.x and it works fine still.

  7. d3lm commented on Jun 12, 2026

    @d3lm

    Hey all 👋 We are looking in this. I ll keep you posted.

  8. SamVerschueren commented on Jun 12, 2026

    @SamVerschueren
    Contributor

    We're still investigating. Everything works perfectly fine in Chrome 148, Firefox, and even Safari (although Safari might have different issues because support is still experimental). So it must be something that has changed in Chrome 149.

  9. SamVerschueren commented on Jun 12, 2026

    @SamVerschueren
    Contributor

    We are able to reproduce this outside WebContainer by using Rolldown directly in the browser. So this issue is likely somewhere upstream. As a temporary workaround you can downgrade to Vite 7 (if possible) because they don't use Rolldown.

    We're doing our best to get this resolved as soon as we can. Sorry for the inconvenience.

  10. SamVerschueren commented on Jun 15, 2026

    @SamVerschueren
    Contributor

    In the mean time, this issue got fixed upstream in emnapi and they now working on getting this fixed in Rolldown/Vite.

  11. SamVerschueren commented on Jun 22, 2026

    @SamVerschueren
    Contributor

    This issue should now be fixed and Vite 8 should be working in WebContainer. If you still run into this issue, please create a new bug report with the project URL so we can investigate. Closing this as completed.

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