Nuxt session middleware to get a persistent session per app user, e.g., to store data across multiple requests. The nuxt session module provides the useSession() composable out of the box and sets up API endpoints to interact with your session to make working with sessions feel like a breeze.
npm install && npm run dev
ERROR [worker reload] [worker init] Cannot add property ignore, object is not extensible 5:01:26 PM
at node_modules/unstorage/drivers/fs.mjs:20:17
at .nuxt/dev/index.mjs:713:16
at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
Describe the bug
If fs is specified for session storage in nuxt.config.js, an error occurs.
The cause is that the unstroage fs driver is updating the config returned by useRuntimeConfig.
The config returned by useRuntimeConfig looks like Object.preventExtensions is set and cannot be updated.
I could not read from the nuxt source code where it is set.
Environment
Build Modules: -
Reproduction
https://github.com/ryoji-yamauchi-blc/nuxt-session-playground
Describe the bug
If fs is specified for session storage in nuxt.config.js, an error occurs.
The cause is that the unstroage fs driver is updating the config returned by useRuntimeConfig. The config returned by useRuntimeConfig looks like Object.preventExtensions is set and cannot be updated. I could not read from the nuxt source code where it is set.
https://github.com/unjs/unstorage/blob/main/src/drivers/fs.ts#L32
Additional context
No response
Logs
No response