stackblitz / stackblitz/starters

Vanilla JS template fails

Open
#118 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
151
Forks
96
Avg merge
9d 6h
Merged PRs (30d)
2

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by opening the linked StackBlitz reproduction and running npm install and npm run dev in the unmodified Vanilla JS starter; inspect the Vite 8/Rolldown initialization failure described in the report. Done means the development server starts successfully in StackBlitz WebContainers without downgrading Vite 7.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
frontend, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.