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

[Bug]: Cannot start storybook dev twice #24595

Closed
webholics opened this issue Oct 27, 2023 · 3 comments
Closed

[Bug]: Cannot start storybook dev twice #24595

webholics opened this issue Oct 27, 2023 · 3 comments

Comments

@webholics
Copy link

Describe the bug

I have a project where we run storybook-react and storybook-html in the same repository.
Therefore I want to be able to start the storybook dev server for react and html in parallel on different ports:

storybook dev -p 3000 -c setup/storybook-react
storybook dev -p 3001 -c setup/storybook-html

But as soon as I start both dev servers I am seeing empty pages or JS errors.
My guess would be that there is some kind of shared cache in node_modules/.cache/storybook where both instances are overwriting necessary files of each other.

This is only an issue since Storybook 7 with the updated CLI tools. Before that it was possible to start both servers in parallel.

To Reproduce

No response

System

Storybook Environment Info:

  System:
    OS: macOS 13.6
    CPU: (12) arm64 Apple M2 Pro
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 19.6.0 - ~/.nvm/versions/node/v19.6.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v19.6.0/bin/yarn
    npm: 9.6.1 - ~/.nvm/versions/node/v19.6.0/bin/npm <----- active
    pnpm: 8.7.6 - ~/.nvm/versions/node/v19.6.0/bin/pnpm
  Browsers:
    Chrome: 118.0.5993.117
    Safari: 16.6

Additional context

No response

@harvestnide
Copy link

+1, was trying to setup composition in NX monorepo

Storybook Environment Info:

  System:
    OS: macOS 14.0
    CPU: (10) arm64 Apple M1 Pro
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.8.0 - /opt/homebrew/bin/node
    Yarn: 3.6.3 - /opt/homebrew/bin/yarn <----- active
    npm: 10.1.0 - /opt/homebrew/bin/npm
  Browsers:
    Chrome: 118.0.5993.117
    Safari: 17.0
  npmPackages:
    @storybook/addon-actions: 7.5.1 => 7.5.1
    @storybook/addon-designs: ^7.0.5 => 7.0.5
    @storybook/addon-docs: 7.5.1 => 7.5.1
    @storybook/addon-essentials: 7.5.1 => 7.5.1
    @storybook/addon-interactions: 7.5.1 => 7.5.1
    @storybook/addon-jest: 7.5.1 => 7.5.1
    @storybook/core-server: 7.5.1 => 7.5.1
    @storybook/jest: ^0.2.3 => 0.2.3
    @storybook/nextjs: 7.5.1 => 7.5.1
    @storybook/preset-scss: ^1.0.3 => 1.0.3
    @storybook/react: 7.5.1 => 7.5.1
    @storybook/test-runner: 0.13.0 => 0.13.0
    @storybook/testing-library: ^0.2.2 => 0.2.2

@Tallyb
Copy link

Tallyb commented Dec 14, 2023

disable devServer: hot did the trick for me.

@shilman
Copy link
Member

shilman commented Dec 24, 2023

Probably fixed by #25264. Please LMK if that is not the case!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

4 participants