profile
viewpoint

Ask questionsAddon-docs: Vue component is not extendable and throws error

Describe the bug

When using addon-docs, using a Vue component in markdown throws an error.

To Reproduce Steps to reproduce the behavior:

  1. Clone https://github.com/system76/design/tree/docs
  2. Run npm ci and npm start
  3. Open storybook in a browser
  4. See error in console

Expected behavior Vue works as expected without an errors.

Code snippets See reproduce repo here: https://github.com/system76/design/tree/docs

Copy paste of console error:

Uncaught (in promise) TypeError: Cannot add property _Ctor, object is not extensible
    at Function.Vue.extend (VM38 vendors~main.05e4748b34b4da958b2d.bundle.js:105406)
    at prepare (VM38 vendors~main.05e4748b34b4da958b2d.bundle.js:28557)
    at VM38 vendors~main.05e4748b34b4da958b2d.bundle.js:28603
    at VM38 vendors~main.05e4748b34b4da958b2d.bundle.js:28593
    at VM38 vendors~main.05e4748b34b4da958b2d.bundle.js:28586
    at withSubscriptionTracking (VM38 vendors~main.05e4748b34b4da958b2d.bundle.js:7499)
    at VM38 vendors~main.05e4748b34b4da958b2d.bundle.js:8011
    at VM38 vendors~main.05e4748b34b4da958b2d.bundle.js:28585
    at VM38 vendors~main.05e4748b34b4da958b2d.bundle.js:8037
    at storyFn (VM38 vendors~main.05e4748b34b4da958b2d.bundle.js:8834)

Link to storybook relevant code: https://github.com/storybookjs/storybook/blob/next/app/vue/src/client/preview/index.ts#L35

System:

  System:
    OS: Linux 5.0 elementary OS 5.0 Juno
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
  Binaries:
    Node: 8.16.0 - /usr/bin/node
    npm: 6.10.0 - /media/btkostner/bed36712-92fb-421c-86c3-7eaae27c0bb5/Projects/system76/design/node_modules/.bin/npm
  Browsers:
    Chrome: beta
    Firefox: 69.0b6
  npmPackages:
    @storybook/addon-centered: ^5.2.0-beta.40 => 5.2.0-beta.40 
    @storybook/addon-docs: ^5.2.0-beta.40 => 5.2.0-beta.40 
    @storybook/addon-knobs: ^5.2.0-beta.40 => 5.2.0-beta.40 
    @storybook/vue: ^5.2.0-beta.40 => 5.2.0-beta.40 
storybookjs/storybook

Answer questions Aaron-Pool

(But obviously that wouldn't be in this release)

useful!
source:https://uonfu.com/
Github User Rank List