storybookjs/storybook

SB 5.3.1 + declarative config + vue-cli-plugin-storybook + TS not working

Closed this issue · 2 comments

Describe the bug
Similar steps to migrate as #9397, from config.ts & addons.ts to main.js I get this error:

ERROR Failed to compile with 1 errors

This dependency was not found:

* @storybook/undefined in ./.storybook/generated-entry.js

To Reproduce
Steps to reproduce the behavior:

  1. Clone https://github.com/bikeshaman/vue-cli-starter (scaffolded with vue create and Storybook installed with vue add storybook, then adjusted to use CSF like the production component library I work with)
  2. Migrate config.ts & addons.ts to

main.js

module.exports = {
  stories: ['../src/**/*.stories.tsx'],
  addons: [
    '@storybook/addon-actions/register',
    '@storybook/addon-knobs/register',
    '@storybook/addon-links/register',
    '@storybook/addon-notes/register',
  ],
};
  1. run npm run storybook:serve
  2. See the error in the terminal

Expected behavior
For the build to succeed without trying to resolve @storybook/undefined 🙃

System:

  System:
    OS: macOS 10.15.2
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Binaries:
    Node: 12.14.0 - ~/.nvm/versions/node/v12.14.0/bin/node
    Yarn: 1.21.1 - /usr/local/bin/yarn
    npm: 6.13.4 - ~/.nvm/versions/node/v12.14.0/bin/npm
  Browsers:
    Chrome: 79.0.3945.117
    Firefox: 72.0.1
    Safari: 13.0.4
  npmPackages:
    @storybook/addon-actions: ^5.3.1 => 5.3.1 
    @storybook/addon-knobs: ^5.3.1 => 5.3.1 
    @storybook/addon-links: ^5.3.1 => 5.3.1 
    @storybook/addon-notes: ^5.3.1 => 5.3.1 
    @storybook/vue: ^5.3.1 => 5.3.1

Confirming, same issue

ERROR in ./.storybook/generated-entry.js
Module not found: Error: Can't resolve '@storybook/undefined' in 'C:\Users\Steven\projects\cloudbeds\ui-elements\.storybook'
 @ ./.storybook/generated-entry.js 1:0-49 3:0-9
 @ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./node_modules/@storybook/addon-docs/dist/frameworks/common/config.js ./.storybook/preview.js ./node_modules/@storybook/addon-knobs/dist/preset/addDecorator.js ./.storybook/g
enerated-entry.js (webpack)-hot-middleware/client.js?reload=true&quiet=true

Fixed by v1.1.0 of vue-cli-plugin-storybook.