-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vue/Nuxt – TypeError: Cannot add property components, object is not extensible #72
Comments
Yeah looks like this is React-only, but that's not explained anywhere in the docs. I wasted hours trying to figure out why stories stopped loading when I included this as a storybook addon; no errors were generated, just all my stories were blank. It really should be clear that this is a React-only addon. |
@bmulholland @rwam if you can give me some context on how I can support vue or what a story in vue would look like with an Apollo Integration, I'd be happy to do what I can to get it working. |
I ended up mocking out Apollo with MSW (https://github.com/mswjs/msw-storybook-addon) so I've solved my immediate problem. That approach does feel heavy-handed, though, and I'd prefer a more direct mock like this library. @lifeiscontent probably the easiest way to try this out in Vue would be to use Nuxt. Some brief instructions that may help:
|
CONTEXT
We are using Storybook to build and test vue components that are in use in a Nuxt.js application. After migration to Apollo 3.x I want to use this addon to mock our GraphQL queries in some of the components.
EXPECTED BEHAVIOR
Storybook using the MockingProvider work without any issues.
CURRENT BEHAVIOR
Storybook cannot be used because any story fails with a TypeError:
The error occurs on
webpack:///node_modules/@storybook/vue/dist/esm/client/preview/decorateStory.js
and the following line of code:TEMPORARELY SOLUTION
I have to remove the addon to get Storybook working again besides of the stories that relate to the use of the ApolloClient.
The text was updated successfully, but these errors were encountered: