Skip to content
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

using @storybook/addon-essentials breaks the manual build #84

Closed
altryne opened this issue Aug 14, 2020 · 4 comments · Fixed by #133
Closed

using @storybook/addon-essentials breaks the manual build #84

altryne opened this issue Aug 14, 2020 · 4 comments · Fixed by #133
Labels
type: bug Something isn't working

Comments

@altryne
Copy link

altryne commented Aug 14, 2020

Version

@nuxtjs/storybook: 1.2.0
nuxt: v2.14.1

Steps to reproduce

  1. npm i -D @storybook/addon-essentials
  2. Follow the guide here:
    https://storybook.nuxtjs.org/manual-setup
  3. npx nuxt-storybook

What is Expected?

Storybook working

What is actually happening?

WARN Unable to find main.js: /Users/alex/fundbox/website_storyblok/Users/alex/fundbox/website_storyblok/storybook/main
info => Loading presets
WARN Unable to find main.js: /Users/alex/fundbox/website_storyblok/Users/alex/fundbox/website_storyblok/storybook/main
info => Loading config/preview file in "/Users/alex/fundbox/website_storyblok/storybook".
info => Loading config/preview file in "/Users/alex/fundbox/website_storyblok/storybook".
WARN We found no files matching any of the following globs:
WARN
WARN ~/components/**/*.stories.@(ts|js)
WARN ~/stories/**/*.stories.js
WARN
WARN Maybe your glob was invalid?
WARN see: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#correct-globs-in-mainjs
WARN Unable to find main.js: /Users/alex/fundbox/website_storyblok/Users/alex/fundbox/website_storyblok/storybook/main
WARN Unable to close preview build!
ERR! WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
ERR!  - configuration.entry should not contain the item '/Users/alex/fundbox/website_storyblok/node_modules/@storybook/addon-actions/dist/register.js' twice.
ERR!    -> A non-empty array of non-empty strings
ERR!     at webpack (/Users/alex/fundbox/website_storyblok/node_modules/webpack/lib/webpack.js:31:9)
ERR!     at /Users/alex/fundbox/website_storyblok/node_modules/@storybook/core/dist/server/dev-server.js:69:48
ERR!  WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
ERR!  - configuration.entry should not contain the item '/Users/alex/fundbox/website_storyblok/node_modules/@storybook/addon-actions/dist/register.js' twice.
ERR!    -> A non-empty array of non-empty strings
ERR!     at webpack (/Users/alex/fundbox/website_storyblok/node_modules/webpack/lib/webpack.js:31:9)
ERR!     at /Users/alex/fundbox/website_storyblok/node_modules/@storybook/core/dist/server/dev-server.js:69:48

@altryne altryne added the type: bug Something isn't working label Aug 14, 2020
@altryne altryne changed the title Manual setup doesn't find stories and shows error on build using @storybook/addon-essentials breaks the manual build Aug 14, 2020
@farnabaz
Copy link
Collaborator

farnabaz commented Aug 14, 2020

@nuxtjs/storybook internally register @storybook/addon-actions, if you want to use @storybook/addon-essentials you need to disable actions addon

addons: [{
    name: '@storybook/addon-essentials',
    options: {
      actions: false,
    }
  }]

@altryne
Copy link
Author

altryne commented Aug 14, 2020

@farnabaz given that actions are bundled into essentials in storybook, maybe it's worth bundling essentials instead of just actions in nuxt/storybook?

@farnabaz
Copy link
Collaborator

actions are required for nuxt-link mock component. I see no reason to embed unused addons in the package. Also, this may break current projects.
Maybe we could create a separate issue to discuss bundled addons

@silvio-e
Copy link

The thing is that the official storybook docs say:

Storybook ships by default with a set of “essential” addons that add to the initial user experience.
Docs
Controls
Actions
Viewport
Backgrounds
Toolbars & globals

That lead on my side to confusion because I was expecting them to be present but they weren't.

In general I agree with @farnabaz but because of the documentation I would suggest to add them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants