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
- Create a new Vanilla JS project from the official StackBlitz template.
- Do not modify any files.
- Run:
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.
Vite 8 official StackBlitz Vanilla template fails with
Cannot find native bindingDescribe the bug
A freshly created official StackBlitz Vanilla JS project fails to start without any modifications.
The project installs dependencies successfully, but
npm run devfails before the dev server starts with:Downgrading to Vite 7 immediately fixes the issue.
Reproduction
Expected behavior
The Vite development server starts successfully.
Actual behavior
The dev server fails during Rolldown initialization.
Terminal output:
Environment
Versions:
Workaround
Downgrading to Vite 7 resolves the problem:
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.