Skip to content

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

@yMeeraki

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions