nuxt-mongoose
nuxt-mongoose copied to clipboard
Nuxt 3.11 - Error: Context is not available
On the recent Nuxt 3.11 I see this error, and the app is not starting:
✔ Connected to MongoDB
ERROR Error connecting to MongoDB: Error: Context is not available
I did some digging, and I think this is realted to the new feature of showing the server side console.log-s on the client side. See: https://nuxt.com/blog/v3-11#better-logging
If I disable the devLogs like so, the app is working again:
nuxt.config.ts
export default defineNuxtConfig({
features: {
devLogs: false
// or 'silent' to allow you to handle yourself with `dev:ssr-logs` hook
},
})
Can this be because nuxt-mongoose uses the consola wrapper for console.log?
@lupus78 I can't reproduce this, can you share a small reproduction? thanks
I wasn't able to reproduce with the latest version 1.0.6