Preview not working | dependency conflict
Describe the bug
dependencies:
- @rolldown/binding-wasm32-wasi 1.2.9
Done in 15s
(node:12) ExperimentalWarning: WASI is an experimental feature and might change at any time
(Use node --trace-warnings ... to show where the warning was created)
Error: __napiBindingTarget is reserved by the generated binding loader, but the loaded binding already exports it. Rename the export, e.g. #[napi(js_name = "...")].
at __napiStampBindingTarget (file:///home/projects/vitejs-vite-ury3zu4t/node_modules/rolldown/dist/shared/binding-BbrDfv1x.mjs:627:34)
at eval (file:///home/projects/vitejs-vite-ury3zu4t/node_modules/rolldown/dist/shared/binding-BbrDfv1x.mjs:642:39)
at Module.eval (file:///home/projects/vitejs-vite-ury3zu4t/node_modules/rolldown/dist/shared/binding-BbrDfv1x.mjs:25:49)
at eval (file:///home/projects/vitejs-vite-ury3zu4t/node_modules/rolldown/dist/shared/parse-DltPb1DL.mjs:19:84) {
code: 'ERR_NAPI_BINDING_TARGET_CONFLICT'
}
Node.js v22.22.3
Link to the blitz that caused the error
https://stackblitz.com/edit/vitejs-vite-ury3zu4t?file=package.json&terminal=dev
Steps to reproduce
npm run dev
Expected behavior
dev server should start, and preview should be visible.
Parity with Local
- [x] I have run the project in my local machine and I could not reproduce the issue.
Screenshots
No response
Platform
Browser name = Chrome
Full version = 152.0.0.0
Major version = 152
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36
performance.memory = {
"totalJSHeapSize": 52491512,
"usedJSHeapSize": 46696348,
"jsHeapSizeLimit": 4395630592
}
Hash = d5306e6f
Additional context
No response
Downgrading following packages to below versions, resolves the issue: @vitejs/plugin-react": "^5.2.0", "vite": "^7.0.0"
I am seeing the same ERR_NAPI_BINDING_TARGET_CONFLICT with Vite 8.3.0, Rolldown 1.2.9, and Node 22.22.3 in StackBlitz.
One additional finding: @rolldown/[email protected] is not installed, and manually installing it fails with:
EBADPLATFORM
wanted: libc: glibc
current: libc: null
npm ls @rolldown/binding-linux-x64-gnu also returns empty. This seems related to how WebContainers detect libc / resolve Rolldown’s platform-specific native bindings.
@Abdellox Steps to reproduce: Go to- https://stackblitz.com/ => Click New Project => Select React (TypeScript) => Code Editor Opens You can see in the terminal, dependencies being installed successfully but running start command fails. Please refer to the attached screenshot.
Please note: If this is happening for everyone, it means huge number of users are getting impacted, and may not be able to create and run react-typescript projects.
@vitejs/plugin-react": "^5.2.0", "vite": "^7.0.0"
downgrading worked for me.
@vitejs/plugin-react": "^5.2.0", "vite": "^7.0.0"
downgrading worked for me.
Downgrading worked for me too, I mentioned that in my previous comment- (https://github.com/stackblitz/webcontainer-core/issues/2170#issuecomment-5748303488)