arashsheyda / nuxt-mongoose

A Nuxt module for simplifying the use of Mongoose in your project.
https://docs.arashsheyda.me/nuxt-mongoose
69 stars 11 forks source link

Cannot add mongoose option to the config file #59

Closed bigbean17 closed 3 weeks ago

bigbean17 commented 1 month ago

Hi,

I'm trying to add mongoose to the config file, but I'm keep getting this error

image

Here is the config file

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  devtools: { enabled: true },
  modules: ["@nuxt/ui", "nuxt-mongoose"],
  css: ['~/assets/css/main.css'],
  mongoose:{

  }
})

Does anyone know how can I fix this? Any help would be appreciated.

Thanks!

arashsheyda commented 1 month ago

@bigbean17 for me usually when I just install the module and try to add mongoose config to nuxt.config, it doesn't recognized it; but when I run the dev script it works. or it might be something with your IDE, if you could share a minimal reproduction we could investigate it better. thanks

Coiggahou2002 commented 1 month ago

@bigbean17 The typescript error you mentioned above may related to the type-generation for nuxt config.

Usually the type-generation process will re-run when you re-run npm run dev, give it a try and see if the error reported by your IDE will gone.