webcontainer-core icon indicating copy to clipboard operation
webcontainer-core copied to clipboard

Preview not working | dependency conflict

Open sunildivyam opened this issue 2 months ago • 6 comments

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

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

sunildivyam avatar Sep 20 '26 07:09 sunildivyam

Downgrading following packages to below versions, resolves the issue: @vitejs/plugin-react": "^5.2.0", "vite": "^7.0.0"

sunildivyam avatar Sep 20 '26 07:09 sunildivyam

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.

jeetsdev avatar Sep 22 '26 11:09 jeetsdev

@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.

Image

sunildivyam avatar Sep 22 '26 16:09 sunildivyam

@vitejs/plugin-react": "^5.2.0", "vite": "^7.0.0"

downgrading worked for me.

moyarich avatar Sep 22 '26 16:09 moyarich

@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)

sunildivyam avatar Sep 22 '26 17:09 sunildivyam