invictus-codes / nuxt-vuetify

Add Vuetify 3 to your Nuxt application in seconds.
MIT License
73 stars 9 forks source link

[Bug]: Object literal may only specify known properties, and 'vuetify' does not exist in type 'NuxtConfig'. #8

Closed edsonfeimberg closed 1 year ago

edsonfeimberg commented 1 year ago

Contact Details

No response

What happened?

When following the default installation guide, the example provided doesn't work in nuxt.config.ts. The following error is displayed:

Argument of type '{ modules: string[]; vuetify: { vuetifyOptions: {}; moduleOptions: { treeshaking: boolean; useIconCDN: boolean; styles: boolean; autoImport: boolean; }; }; }' is not assignable to parameter of type 'NuxtConfig'. Object literal may only specify known properties, and 'vuetify' does not exist in type 'NuxtConfig'.

Nuxt.config.ts:

export default defineNuxtConfig({
    modules: [
      '@invictus.codes/nuxt-vuetify'
    ],
    vuetify: {
      /* vuetify options */
      vuetifyOptions: {
      },

      moduleOptions: {
        /* nuxt-vuetify module options */
        treeshaking: true,
        useIconCDN: true,

        /* vite-plugin-vuetify options */
        styles: true,
        autoImport: true,
      }
    }
  })

Version

1.0.2 (Default)

What browsers are you seeing the problem on?

No response

Relevant log output

No response

Additional context

No response

evele commented 1 year ago

Same issue here

albertogrolli commented 1 year ago

Same here

edit:

Did you do a nuxt prepare? (should be automatically run after each install from the script postinstall) @jvhellemondt

I didn't do a nuxt prepare but managed to solve running yarn dev with

export default defineNuxtConfig({
    modules: [
      '@invictus.codes/nuxt-vuetify'
    ]
  })

only and later added the vuetify options.

jvhellemondt commented 1 year ago

Did you do a nuxt prepare? (should be automatically run after each install from the script postinstall)

maximran800 commented 1 year ago

i was only be able to run using the below option

// // https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ modules: [ '@invictus.codes/nuxt-vuetify', ['@invictus.codes/nuxt-vuetify', { vuetifyOptions: { }, moduleOptions: { /* nuxt-vuetify module options */ treeshaking: true, useIconCDN: true, /* vite-plugin-vuetify options */ styles: true, autoImport: true, } }] ] })