Nuxt.js: Nuxt.js + Vuetify.js component injection problem

Created on 29 Nov 2017  Â·  12Comments  Â·  Source: nuxt/nuxt.js

Use this repo - https://github.com/nzxt/vue-nuxt.git
or

  1. Create nuxt.js + vuetify.js project using vue-cli:
    vue init vuetifyjs/nuxt w/o a-la-carte.
  2. Edit any page component (inspire.vue in my case) adding v-carousel element on it.
  3. npm i && npm run dev
  4. Go to localhost:3000/inspire page.
  5. Get error:
  6. On page:
    Cannot read property 'unregister' of undefined
  7. In console:
[Vue warn]: Injection "carousel" not found
found in
---> <VCarouselItem>
       <VCarousel>
         <Pages\inspire.vue> at pages\inspire.vue
           <Nuxt> at .nuxt\components\nuxt.vue
             <VContent>
               <VApp>
                 <Default> at layouts\default.vue
                   <Root>

If you remove v-carousel-item from v-carousel - Carousel shows on page and seems no errors in console.

Almost same thing happens with v-stepper component, console says:
Did you import 'v-stepper-items' correctly?

Where to dig in?

This question is available on Nuxt.js community (#c1999)

Most helpful comment

Unfortunately nuxt hasn't been updated in awhile and does not officially support the newer Vue versions.

All 12 comments

Vuetify 0.17 requires a Vue version of at least 2.5. This may be the cause of your issue.

@johnleider Thanks, man! Updating 3 module dependencies to latest versions fixed the problem:

    "vue": "^2.5.9",
    "vue-server-renderer": "^2.5.9",
    "vue-template-compiler": "^2.5.9",

The second one about v-stepper component was my fault. I switched to the previous version of proj, where we are using vuetifyjs 15.7 and there are no <v-stepper-items> tag yet.
p/s: <strong>Lovin' your frameworks, guys!</strong>

I am also experiencing the same issue with the carousel. My Vue version is '2.9.1' and vuetify version is "vuetify": "^0.17.3". Any help will really be appreciated.

That's not a valid Vue version, latest is 2.5.9

On Nov 30, 2017 7:10 AM, "fakhir-shad" notifications@github.com wrote:

I am also experiencing the same issue with the carousel. My Vue version is
'2.9.1' and vuetify version is "vuetify": "^0.17.3". Any help will really
be appreciated.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nuxt/nuxt.js/issues/2283#issuecomment-348170699, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AIpOghq0Y-XvviCS1BeaT1GfFhJKEYjTks5s7psXgaJpZM4QvOE8
.

Problem persist...: with latest nuxt so long, 1.0.0-rc11, (vue 2.5.13):
https://github.com/nuxt/nuxt.js/blob/447b314a459943496d1e309a72e1758c49bc05ee/package.json

Unfortunately nuxt hasn't been updated in awhile and does not officially support the newer Vue versions.

As @nekosaur commented on https://github.com/vuetifyjs/vuetify/issues/2637#issuecomment-347858455, installing latest vue as a dependency, solves temporaryly the problem of optional injects using nuxt. Thanks for the amazing work to everyone.

Hi,

Im using the starter-template, eventually i added vuetify.
I think some components are not working properly.

TIA

@gomezmark, you can try either:
vuetifyjs/nuxt template or
@nuxtjs/vuetify module.

Elaborate a little bit more (adding a reproduction demo, if possible) on a different ticket, maybe (your point is not related to this issue).

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vadimsg picture vadimsg  Â·  3Comments

vadimsg picture vadimsg  Â·  3Comments

gary149 picture gary149  Â·  3Comments

msudgh picture msudgh  Â·  3Comments

bimohxh picture bimohxh  Â·  3Comments