radix-vue / shadcn-vue

Vue port of shadcn-ui
https://www.shadcn-vue.com/
MIT License
3.81k stars 217 forks source link

[Bug]: StackBlitz, shadcn-nuxt – Error: Cannot load native addon because loading addons is disabled #433

Closed bogdan0083 closed 3 months ago

bogdan0083 commented 4 months ago

Reproduction

https://stackblitz.com/edit/nuxt-starter-8bnktk?file=package.json

Describe the bug

Right now it's not possible to create reproduction on StackBlitz and use shadcn-nuxt as a dependency. It throws error:

[11:56:05]  ERROR  Error while requiring module shadcn-nuxt: Error: Cannot load native addon because loading addons is disabled: /home/projects/nuxt-starter-8bnktk/node_modules/@oxc-parser/binding-linux-x64-musl/parser.linux-x64-musl.node

[11:56:05]  ERROR  Cannot load native addon because loading addons is disabled: /home/projects/nuxt-starter-8bnktk/node_modules/@oxc-parser/binding-linux-x64-musl/parser.linux-x64-musl.node

Basically it's because oxc-parser dependency uses native addons under the hood, but WebContainers don't support it

System Info

(taken from stackblitz repro):

  System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.18.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.3 - /usr/local/bin/pnpm
  npmPackages:
    nuxt: ^3.11.1 => 3.11.1 
    shadcn-nuxt: ^0.10.2 => 0.10.2

Contributes

Saeid-Za commented 4 months ago

It seems that there is an official wasm release. we could swap the native one with wasm.

More Info Here.

Saeid-Za commented 4 months ago

There is an issue with wasm release. I've opened an issue here.

kelvinsekx commented 3 months ago

Commenting to keep me updated on the progress.

sadeghbarati commented 3 months ago

@kelvinsekx Hi, you can subscriber to the issue with this button instead of notifying others 🙏

image

Saeid-Za commented 3 months ago

The upstream issue is resolved, I think we could go forward using wasm build.