teambit / bit

A build system for development of composable software.
https://bit.dev
Other
17.87k stars 927 forks source link

Vuetify not working with bit component when I import and use it in NUXT project #9071

Closed subham25997 closed 3 months ago

subham25997 commented 3 months ago

My Workspace

NUXT APP

Getting error: image

Specifications

Jinjiang commented 3 months ago

I suggest:

  1. if you set vuetify as a peer dep, you have to ensure it's well-installed where you consume your components. Here that means the new workspace you have created.
  2. the v-btn is usually registered by an auto-import plugin like https://www.npmjs.com/package/vite-plugin-vuetify or https://www.npmjs.com/package/webpack-plugin-vuetify. I guess it's not well-configured in your workspace. Another way to make it works is explicitly importing it in your app like:

    <script setup>
    import { VBtn } from 'vuetify/components'
    </script>
    
    <template>
      <v-btn>...</v-btn>
    </template>
subham25997 commented 3 months ago

Thank you! It worked.