Your example doesn't work, either locally or on stackblitz.
Also tried installing nuxt-mongoose separately and still doesn't work either. Although if you put a regular mongoose, everything works. It doesn't connect or it gives an error also when connecting Error connecting to MongoDB connect ECONNREFUSED 127.0.0.1:27017
here is the deployed version which is working. just make sure to add a uri for connection. either in nuxt.config.ts mongoose.uri or in your .env as MONGODB_URI
Your example doesn't work, either locally or on stackblitz. Also tried installing nuxt-mongoose separately and still doesn't work either. Although if you put a regular mongoose, everything works. It doesn't connect or it gives an error also when connecting
Error connecting to MongoDB connect ECONNREFUSED 127.0.0.1:27017
https://stackblitz.com/github/arashsheyda/nuxt-mongoose-minimal https://github.com/arashsheyda/nuxt-mongoose-minimal