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

Cannot run examples in dev mode #698

Closed
obulat opened this issue Jul 12, 2024 · 6 comments · Fixed by #715
Closed

Cannot run examples in dev mode #698

obulat opened this issue Jul 12, 2024 · 6 comments · Fixed by #715

Comments

@obulat
Copy link
Contributor

obulat commented Jul 12, 2024

Description

When you run examples in the dev mode, Storybook renders error pages instead of stories.

Reproduction

  1. Set up the repo locally :
  • pnpm install
  • pnpm dev:prepare
  • pnpm example:showcase:build
  1. Run the examples/showcase in dev mode (pnpm example:showcase:dev)
  2. Go to the rendered storybook page using the URL from the console (http://localhost:6006)
  3. See error: the pages do not render. The error shown is something like
The requested module '/@fs/.../storybook/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/kebabCase.js?v=8b996205' does not provide an export named 'default'

There are also the following warnings in the console:

 WARN  Sourcemap for "/virtual:/@storybook/builder-vite/vite-app.js" points to missing source files                                                                                                                    7:56:31 AM
 WARN  Sourcemap for "/virtual:/@storybook/builder-vite/setup-addons.js" points to missing source files 
WARN  The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
WARN The following packages are incompatible with Storybook 8.2.1 as they depend on different major versions of Storybook packages:
WARN - @storybook/test@8.1.11 (8.2.1 available!)
@chakAs3
Copy link
Collaborator

chakAs3 commented Jul 12, 2024

@obulat sorry we had an issue with the last release, we are working on fixing it

@tobiasdiez
Copy link
Collaborator

You also need to run dev:prepare and build before running the examples.

@obulat
Copy link
Contributor Author

obulat commented Jul 12, 2024

I understand, @chakAs3, and I'm trying to help providing more debugging information :) Storybook is one of the last missing parts for our Nuxt 3 migration at Openverse.

Thank you, @tobiasdiez, I've updated the reproduction steps with your instructions. The errors still persist, unfortunately.

@obulat
Copy link
Contributor Author

obulat commented Jul 12, 2024

I tried installing the new version of this module into our Nuxt 3 branch. The module is built (it's not just the package.json as yesterday), but I get the same errors I listed in this issue.

Storybook-related dependencies
@storybook/addon-essentials 8.2.2
@storybook/test 8.2.2
@storybook/addon-interactions 8.2.2
@storybook/addon-links 8.2.2
@nuxtjs/storybook 8.1.5
@storybook/addon-onboarding 8.2.2
@storybook/blocks 8.2.2
storybook 8.2.2
@storybook-vue/nuxt 8.1.5
@storybook/builder-vite 8.2.2

When installing Storybook module with npx storybook-nuxt init, I installed all the old packages because storybook-nuxt was last deployed 3 months ago. I had to update all dependency versions manually.

@chakAs3
Copy link
Collaborator

chakAs3 commented Jul 13, 2024

@obulat The storybook-nuxt package hasn't been updated because it's now integrated with the Storybook init CLI. Running npx storybook init will automatically detect your Nuxt project, configure your Storybook, and install the latest package versions. @tobiasdiez, was it merged?

@tobiasdiez
Copy link
Collaborator

@obulat The storybook-nuxt package hasn't been updated because it's now integrated with the Storybook init CLI. Running npx storybook init will automatically detect your Nuxt project, configure your Storybook, and install the latest package versions. @tobiasdiez, was it merged?

It was reverted last-minute: storybookjs/storybook#28479

tobiasdiez added a commit that referenced this issue Jul 13, 2024
…715)

<!---
☝️ PR title should follow conventional commits
(https://conventionalcommits.org)
-->

### 🔗 Linked issue

Fixes #698.

<!-- If it resolves an open issue, please link the issue here. For
example "Resolves #123" -->

### ❓ Type of change

<!-- What types of changes does your code introduce? Put an `x` in all
the boxes that apply. -->

- [ ] 📖 Documentation (updates to the documentation or readme)
- [ ] 🐞 Bug fix (a non-breaking change that fixes an issue)
- [ ] 👌 Enhancement (improving an existing functionality)
- [ ] ✨ New feature (a non-breaking change that adds functionality)
- [ ] 🧹 Chore (updates to the build process or auxiliary tools and
libraries)
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to change)

### 📚 Description

<!-- Describe your changes in detail -->
<!-- Why is this change required? What problem does it solve? -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants