N
Nuxt2w ago
dmarr

@nuxtjs/color-mode@4.0.0 causing issues

I recently updgraded nuxt and color-mode module in my shared layer. Now, when I try to run my app that extends the layer, things are not working. It's a tough one to explain, but I get an error when I try to run a test for example:
[nuxt] error caught during app initialization TypeError: Cannot read properties of undefined (reading 'preference')
at /Users/david.marr/src/my-nuxt-app/node_modules/@nuxtjs/color-mode/dist/runtime/plugin.client.js:19:24
[nuxt] error caught during app initialization TypeError: Cannot read properties of undefined (reading 'preference')
at /Users/david.marr/src/my-nuxt-app/node_modules/@nuxtjs/color-mode/dist/runtime/plugin.client.js:19:24
3 Replies
kapa.ai
kapa.ai2w ago
Hi @dmarr. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- I'm sorry, but the provided knowledge sources do not contain specific information about issues with @nuxtjs/color-mode@4.0.0 causing a "Cannot read properties of undefined (reading 'preference')" error after upgrading Nuxt and the color-mode module in a shared layer. There are related discussions about color mode configuration and its interaction with localStorage and .md files, but nothing directly addresses this error or its resolution in the context of shared layers or recent upgrades. If you can provide more details or a minimal reproduction, it may help in diagnosing the issue. Otherwise, based on the current knowledge sources, I cannot provide a confident answer. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2w ago
<@139883350096740354> Kapa.ai is still learning and improving, please let me know how I did by reacting below.

Did you find this page helpful?