Cannot add property components, object is not extensible
See original GitHub issueDescribe the bug
Installed @storybook/addon-info to work with a Vue app, but I’ve been unable to get it working as it seems to break storybook as it renders the error Cannot add property components, object is not extensible.
I’ve tried to use addDecorator in config.js (breaks all stories) and also inside a single story (breaks just that story).
Also uninstall all other addon’s and went back to a clean storybook install but still running into the same issue.
Screenshots

Code snippets
// .storybook/config.js
import '@storybook/addon-console';
import { addDecorator, configure } from '@storybook/vue';
import { withInfo } from '@storybook/addon-info';
// Import plugins.
import Vue from 'vue';
import Vuex from 'vuex';
// Install plugins.
Vue.use(Vuex);
// Storybook Info Addon
// https://github.com/storybooks/storybook/tree/master/addons/info#storybook-info-addon
addDecorator(withInfo);
// Load stories, display order determined by import order.
const req = require.context('../src', true, /.stories.js$/);
function loadStories() {
req.keys().forEach((filename) => req(filename))
}
configure(loadStories, module);
// my.stories.js
import { storiesOf } from '@storybook/vue';
import Button from './button';
storiesOf('Components/Atoms/Button', module)
.add('default', () => ({
template: `
<Button @onClick="onClick">Default Button</Button>
`,
components: { Button },
}));
// button.vue
<template>
<Component
:is="element"
:class="buttonClasses"
v-bind="attributes"
@click="$emit('onClick')"
>
<slot />
</Component>
</template>
<script>
export default {
name: 'Button',
props: {
href: { type: String, default: '' },
primary: { type: Boolean, default: false },
},
computed: {
element() {
return this.href ? 'a' : 'button';
},
buttonClasses() {
return {
button: true,
primary: this.primary,
secondary: !this.primary,
};
},
attributes() {
return {
...(this.href ? { href: this.href, target: '_blank' } : {}),
};
},
},
};
</script>
System:
- OS: MacOS
- Device: Macbook Pro 2018
- Browser: chrome
- Framework: vue
- Addons: addon-info
- Version: 4.0.4
Would absolutely ❤️ to use this plugin as it’s one of the main attractions to storybook for us. Please let me know if there is anything I can to do to help.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:5 (3 by maintainers)
Top Results From Across the Web
React : cannot add property 'X', object is not extensible
I want to add a property 'LegendPosition' with the props in this component. I am unable to do that. Please help me with...
Read more >Cannot add property _children, object is not extensible
I am trying to work with lwc tree-grid and move the results returned from my query display there related data. However it looks...
Read more >cannot add property _ctor, object is not extensible - You.com
Uncaught error "Cannot add property _Ctor, object is not extensible". As of v2.4.0, ES modules are auto-resolved when used as dynamic components e.g.....
Read more >React "Cannot add property _gsap, object is not extensible"
I want to implement it to my React / Next.js project. I wanted to have gsap animation codes be seperate from my page/component...
Read more >Cannot add property <propName>, object is not extensible
It's a ridicolous problem. Sometimes a top-level property in one of my React components (not part of the state) gets locked, sometimes a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I think this needs to be noted somewhere in the docs - spent a few hours debugging this not realising it didn’t support Vue.
The official
addon-infois platform specific, and currently has only React implementation https://github.com/storybooks/storybook/blob/next/ADDONS_SUPPORT.mdBut you can use this one https://github.com/pocka/storybook-addon-vue-info =)