Storybook: Can not get DocPages to work with Vue

Created on 6 Nov 2019  路  7Comments  路  Source: storybookjs/storybook

Describe the bug
I am trying to use the latest version of @storybook/addon-docs within a Vue app, and my Storybook is erroring with the following stack trace:

config.js:8 Uncaught TypeError: (0 , _clientApi.addParameters) is not a function
    at Object../node_modules/@storybook/addon-docs/dist/frameworks/common/config.js (config.js:8)
    at __webpack_require__ (bootstrap:785)
    at fn (bootstrap:150)
    at Object.0 (Welcome.js:4)
    at __webpack_require__ (bootstrap:785)
    at checkDeferredModules (bootstrap:45)
    at Array.webpackJsonpCallback [as push] (bootstrap:32)
    at main.e1e8e46e66038bd1d7df.bundle.js:1

To Reproduce
Steps to reproduce the behavior:

  1. Install the latest version of docs following these instructions - currently installs "^5.3.0-alpha.40"
  2. Rebuild / reload storybook

Expected behavior
My Storybook to load as expected. Note that I have added no components and this is a fresh install via npx -p @storybook/cli sb init --type vue

Screenshots
image

System:

System:
    OS: macOS Mojave 10.14.5
    CPU: (4) x64 Intel(R) Core(TM) i5-4670 CPU @ 3.40GHz
  Binaries:
    Node: 10.15.0 - /usr/local/bin/node
    Yarn: 1.16.0 - ~/.yarn/bin/yarn
    npm: 6.9.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 78.0.3904.87
    Firefox: 70.0
    Safari: 12.1.1
  npmPackages:
    @storybook/addon-actions: ^5.2.5 => 5.2.5 
    @storybook/addon-docs: ^5.3.0-alpha.40 => 5.3.0-alpha.40 
    @storybook/addon-links: ^5.2.5 => 5.2.5 
    @storybook/addons: ^5.2.5 => 5.2.5 
    @storybook/vue: ^5.2.5 => 5.2.5 

Additional context
If I downgrade my doc pages to i.e. 5.2.0-beta.19 the docpages load, though I am hoping to add features such as prop tables etc.

docs vue question / support

Most helpful comment

@JserShadow All your @storybook/* should be the same version. So if you're using 5.3-beta for @storybook/addon-docs you should be using the same for @storybook/vue

All 7 comments

Alright, I have this working by making sure all my @storybook packages are the same version (currently 5.3.0-alpha.40), however I'm still struggling to figure out how to display any of the additional features on the Docs page, I only get the component view.

Just to clarify, the features such as props table and description are available within Vue setups aren't they?

@michaelsmedley Yeah. This is all very new, but should work for vue SFC's. There are some issues with non-SFC components that we're still working through: https://github.com/pocka/storybook-addon-vue-info/issues/119

@shilman Hi, appreciate the response.

I'm going to close this issue as I got everything working that I needed. I had a sleep, came back to it fresh and went through the setup instructions. I now have the docs page showing the title, description and prop information, which is what I wanted.

Please put this down to user error, and let me tell you that this new feature is going to be a big bonus for my workflow, thanks to all involved with it

@michaelsmedley Awesome!! Glad to hear you got it working. We're just getting started -- hope we can deliver a bunch more good stuff for all docs users!!!

@shilman Hi, I'm also using the latest version of @storybook/addon-docs , and I got the same problem in react, @storybook/react 5.2.8. How can I fix it, or anything I can do?

@JserShadow All your @storybook/* should be the same version. So if you're using 5.3-beta for @storybook/addon-docs you should be using the same for @storybook/vue

@shilman That works for me. Thanks a lot!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shilman picture shilman  路  3Comments

sakulstra picture sakulstra  路  3Comments

dnlsandiego picture dnlsandiego  路  3Comments

rpersaud picture rpersaud  路  3Comments

purplecones picture purplecones  路  3Comments