NickMcBurney / storybook-vue3-router

A Storybook decorator that allows you to use Vue 3 / vue-router@4 routing-aware components.
MIT License
29 stars 8 forks source link

Doesn't work with storybook 7.1.x? #52

Closed paulcwatts closed 1 year ago

paulcwatts commented 1 year ago

Version: 3.0.0

I recently tried to upgrade to Storybook 7.1.1 from 7.0.9. Previously where my stories worked with storybook-vue3-router, they now have the warnings:

[Vue warn]: injection "Symbol(route location)" not found. 
[Vue warn]: injection "Symbol(router)" not found. 
[Vue warn]: Failed to resolve component: router-link
[Vue warn]: Property "$route" was accessed during render but is not defined on instance. 

Which causes subsequent errors (mostly in my code which assumed these to exist). I am able to use the latest 7.0.x release (7.0.27), but 7.1.x doesn't work.

Has this been tested with 7.1.x? If so, it might be something specific about my configuration (such as a monorepo). I can do more investigation if that's the case.

seno-vd commented 1 year ago

@paulcwatts I don't know what your stories looks like but I am able to incorporate the plugin with Storybook v7.2.1.

paulcwatts commented 1 year ago

OK, I tried it again and it looked like some duplicated some dependencies were causing issues -- it seems to work now.

jamesalways commented 1 year ago

I am having this error too, using"@storybook/vue3": "^7.3.2", and "storybook-vue3-router": "^3.0.0"