NuxtN
Nuxt5mo ago
10 replies
___anj___

Cannot read properties of undefined (reading 'nuxt2Context')

I'm trying to enable nuxt bridge on my app. I have:
- Nuxt 2.18.1
- Vue 2.7.16

I've installed bridge and configured it like this:
  bridge: {
    nitro: false,
    typescript: false,
    capi: true,
  },
  imports: {
    autoImport: false,
  },


But now when I launch npm run dev then I get this error:
[5:14:20 PM]  ERROR  [Vue warn]: Error in setup: "TypeError: Cannot read properties of undefined (reading 'nuxt2Context')"

(found in <Root>)


[5:14:20 PM]  ERROR  [VSF][error]:  Logged in errorMiddleware TypeError: Cannot read properties of undefined (reading 'nuxt2Context')
    at useContext (server.js:39756:13)
    at useVSFContext (server.js:6832:84)
    at useRouteExtended (server.js:26882:81)
    at setup (server.js:86923:78)
    at invokeWithErrorHandling (server.js:123086:26)
    at initSetup (server.js:122549:25)
    at initState (server.js:125288:3)
    at Vue._init (server.js:125580:5)
    at new VueComponent (server.js:125709:12)
    at defaultCloneComponent (server.js:97434:11)


What is wrong How can I debug it and fix it?
Was this page helpful?