Reputation: 81
I'm trying to run the Nuxt3 app but when I'm trying to run npm run dev then this error showing in my console: ERROR Cannot start nuxt: Context is not available
Anyone have face the same type of issue and how to fix that.
Upvotes: 2
Views: 1698
Reputation: 1
I had same issue, when i try generated app for production "npm run generate".
Most likely its a version issue, update nuxt to "3.0.0-rc.8"
https://github.com/nuxt/framework/issues/6583
Upvotes: 0
Reputation: 129
I had this same issue but the problem was that I was trying to use Nuxt/Vue specific functionality in a .ts
file.
I was abstracting some of the lengthier functions and computed
objects into a composition file, specifically import { useNuxtApp } from '#imports'
and const { $store } = useNuxtApp()
. The .ts
file has no Nuxt context so these imports and functions just won't work there!
Might you be experiencing something similar?
Upvotes: 0