Cannot read properties of undefined (reading 'createProvider') in Storybook #1434
Unanswered
wadakatu
asked this question in
Help (Vue)
Replies: 1 comment 1 reply
-
We've had the same problem. We've fixed it by mocking the import { setup } from "@storybook/vue3";
import { createHeadManager } from '@inertiajs/core';
setup((app) => {
const mockedHeadManager = createHeadManager(false , () => '', () => '');
Object.defineProperty(app.config.globalProperties, '$headManager', {
get: () => mockedHeadManager
})
}); This is the reference to |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi.
I am using Storybook to generate UI catalog.
I used Laravel, Vue3 and Inertia.js to create my app.
When I create a story of component which include inertia head component, I got an error.
Cannot read properties of undefined (reading 'createProvider')
I have already read this issue which is related to this error.
It says that
.use(plugin)
is missing.Therefore, I added
app.use(plugin)
in .storybook/preview.js, but it doesn't work.Is there any other way to resolve this error in Storybook?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions