shadcn-vue icon indicating copy to clipboard operation
shadcn-vue copied to clipboard

[Bug]: Installing component with Nuxt adds @vueuse/core even with @vueuse/nuxt installed

Open joaolisboa opened this issue 1 year ago • 1 comments

Reproduction

In a new Nuxt project with @vueuse/nuxt, install the Textarea component

Describe the bug

When installing a component the uses @vueuse/core in a Nuxt project it adds the @vueuse/core package to the dependencies even if @vueuse/nuxt package already exists

Before installing component(ie. Textarea):

CleanShot 2024-09-27 at 18 58 17@2x

Right after Installing:

CleanShot 2024-09-27 at 19 00 13@2x

System Info

System:
    OS: macOS 14.5
    CPU: (8) arm64 Apple M1 Pro
    Memory: 87.64 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node
    npm: 10.2.4 - ~/.nvm/versions/node/v20.11.0/bin/npm
    bun: 1.1.0 - /opt/homebrew/bin/bun
  Browsers:
    Safari: 17.5
  npmPackages:
    nuxt: ^3.13.2 => 3.13.2 
    radix-vue: ^1.9.6 => 1.9.6 
    shadcn-nuxt: ^0.10.4 => 0.10.4 
    vue: ^3.5.6 => 3.5.6

Contributes

  • [ ] I am willing to submit a PR to fix this issue
  • [ ] I am willing to submit a PR with failing tests

joaolisboa avatar Sep 27 '24 18:09 joaolisboa

  1. @vueuse/nuxt and npm i @vueuse/nuxt

@vueuse/nuxt is an add-on of VueUse, which provides better Nuxt integration auto-import capabilities.

You must install both.

nmhungdev avatar Oct 01 '24 03:10 nmhungdev