Skip to content

Vanilla JS template fails #118

Description

@balazs-laszlo-facekom

Vite 8 official StackBlitz Vanilla template fails with Cannot find native binding

Describe the bug

A freshly created official StackBlitz Vanilla JS project fails to start without any modifications.

The project installs dependencies successfully, but npm run dev fails before the dev server starts with:

Error: Cannot find native binding.

Downgrading to Vite 7 immediately fixes the issue.

Reproduction

  1. Create a new Vanilla JS project from the official StackBlitz template.
  2. Do not modify any files.
  3. Run:
npm install
npm run dev

Expected behavior

The Vite development server starts successfully.

Actual behavior

The dev server fails during Rolldown initialization.

Terminal output:

> vite-starter@0.0.0 dev
> vite

[rolldown] Downloading @rolldown/binding-wasm32-wasi@1.1.5 on WebContainer...

(node:12) ExperimentalWarning: WASI is an experimental feature and might change at any time

Error: Cannot find native binding. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
    at .../node_modules/rolldown/dist/shared/binding-*.mjs

Environment

  • Platform: StackBlitz WebContainers
  • Browser: Chrome (latest)
  • OS: Ubuntu
  • Project: Official StackBlitz Vanilla JS starter
  • No project modifications

Versions:

vite-starter@0.0.0
└── vite@8.1.5
    └── rolldown@1.1.5

Workaround

Downgrading to Vite 7 resolves the problem:

npm install -D vite@7
npm run dev

After downgrading, the same project starts normally.

Reproduction project

https://stackblitz.com/edit/vitejs-vite-bxj56dkd?file=index.html

Additional notes

This appears to be specific to the Vite 8/Rolldown startup path in the StackBlitz WebContainer environment, since the identical project works after downgrading to Vite 7.

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