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

Setup doesn't work #793

Open
luca-smartpricing opened this issue Oct 1, 2024 · 1 comment
Open

Setup doesn't work #793

luca-smartpricing opened this issue Oct 1, 2024 · 1 comment
Labels
status: good first issue Good for newcomers status: help wanted Good idea, but the core developers will not work on it at the moment type: documentation Improvements or additions to documentation

Comments

@luca-smartpricing
Copy link

luca-smartpricing commented Oct 1, 2024

Environment

  • Operating System: Linux
  • Node Version: v18.20.3
  • Nuxt Version: 3.13.2
  • CLI Version: 3.14.0
  • Nitro Version: 2.9.7
  • Package Manager: npm@10.2.3
  • Builder: -
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/nuxt-starter-yo3hjv

Describe the bug

In the docs you say:
Installation:
Install @nuxtjs/storybook dependency to your project:
npx nuxi@latest module add storybook
Add it to your modules section in your nuxt.config:

export default defineNuxtConfig({
  modules: ['@nuxtjs/storybook'],
})

That's it! You can now use Storybook in your Nuxt app ✨

It's not true. It doesnt'work

Error

ERROR  No configuration files have been found in your configDir: /Users/lucabortolussi/Projects/website-v3/.storybook.                       nuxt:storybook:build 12:28:45 PM
Storybook needs a "main.js" file, please add it.

You can pass a --config-dir flag to tell Storybook, where your main.js file is located at.

More info: https://storybook.js.org/docs/configure


  Storybook needs a "main.js" file, please add it.
  
  You can pass a --config-dir flag to tell Storybook, where your main.js file is located at.
  
  More info: https://storybook.js.org/docs/configure
  
  at validateConfigurationFiles (node_modules/@storybook/core/dist/common/index.js:139226:11)
  at async loadMainConfig (node_modules/@storybook/core/dist/common/index.js:140361:3)
  at async buildDevStandalone (node_modules/@storybook/core/dist/core-server/index.js:48532:11)
  at async withTelemetry (node_modules/@storybook/core/dist/core-server/index.js:47133:12)
  at async setupStorybook (node_modules/@nuxtjs/storybook/dist/module.mjs:54:18)

 WARN Broken build, fix the error above.
You may need to refresh the browser.

ERROR  [unhandledRejection] No configuration files have been found in your configDir: /Users/lucabortolussi/Projects/website-v3/.storybook.
Storybook needs a "main.js" file, please add it.

You can pass a --config-dir flag to tell Storybook, where your main.js file is located at.

More info: https://storybook.js.org/docs/configure

Storybook needs a "main.js" file, please add it.

You can pass a --config-dir flag to tell Storybook, where your main.js file is located at.

More info: https://storybook.js.org/docs/configure at validateConfigurationFiles (node_modules/@storybook/core/dist/common/index.js:139226:11)
@luca-smartpricing luca-smartpricing added the type: bug Something isn't working label Oct 1, 2024
@tobiasdiez
Copy link
Collaborator

Right, you also need to add the config of https://storybook.nuxtjs.org/storybook/config#default-configuration.
That page is also wrong - we would like to ship a default config but this is not yet done (will be part of #660 and/or #659).

In the meantime, could you please create a PR that brings the docs from a wishful thinking more in line with reality? Thanks!

@tobiasdiez tobiasdiez added type: documentation Improvements or additions to documentation status: good first issue Good for newcomers status: help wanted Good idea, but the core developers will not work on it at the moment and removed type: bug Something isn't working labels Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: good first issue Good for newcomers status: help wanted Good idea, but the core developers will not work on it at the moment type: documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants