Skip to content

fix: @nuxtjs/color-mode breaks the project #43

Description

@cipami

🐛 The bug

Not sure if this is ionic module problem or color-mode. But when adding @nuxtjs/color-mode to the ionic project it breaks.

 [Vue warn]: inject() can only be used inside setup() or functional components.
[nuxt] [request error] [unhandled] [500] Cannot read properties of undefined (reading 'afterEach')
at eval (./.nuxt/dist/server/server.mjs:2687:36) at fn (./.nuxt/dist/server/server.mjs:454:27) at Object.callAsync (./node_modules/unctx/dist/index.mjs:68:19) at callWithNuxt (./.nuxt/dist/server/server.mjs:456:23) at applyPlugin (./.nuxt/dist/server/server.mjs:400:29) at Module.applyPlugins (./.nuxt/dist/server/server.mjs:410:11) at async createNuxtAppServer (./.nuxt/dist/server/server.mjs:59:7) at async Object.renderToString (./node_modules/vue-bundle-renderer/dist/runtime.mjs:198:19) at async eval (./.nuxt/dev/index.mjs:533:21) at async eval (./.nuxt/dev/index.mjs:117:22)
### 🛠️ To reproduce
https://stackblitz.com/edit/github-wgn6d9?file=package.json
### 🌈 Expected behaviour
Both packaged works together as I need ability for users to manually change color mode.
### ℹ️ Additional context
_No response_

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions