Skip to content

[Bug]: @storybook/addon-storysource is not working correctly after upgrading to 8.5.0 or newer versions #30428

Closed as not planned
@k4rl1

Description

@k4rl1

Describe the bug

When upgrading to storybook 8.5.0 or higher when you open a story the first time the code section just shows loading source...
when you switch then to a different story and afterwards switch back the the previous one the code is shown.

Worked correctly with 8.4.7 or earlier versions.

Thanks for taking a look.

Reproduction link

https://stackblitz.com/edit/github-s7irpf5e-cwmbsazi?file=.storybook%2Fmain.ts

Reproduction steps

you need to have use storybook plugin @storybook/addon-storysource with version 8.5.0 or higher
select a story -> the code block will just show loading source...
select a different story -> which again will just show show loading source...
navigate back to the previous story and it will show the code correctly

works fine with 8.4.7 or below.

System

Storybook Environment Info:

  System:
    OS: macOS 14.7.1
    CPU: (10) arm64 Apple M2 Pro
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.20.4 - ~/.nvm/versions/node/v18.20.4/bin/node
    npm: 10.7.0 - ~/.nvm/versions/node/v18.20.4/bin/npm <----- active
    pnpm: 9.12.3 - ~/.nvm/versions/node/v18.20.4/bin/pnpm
  Browsers:
    Chrome: 132.0.6834.160
    Safari: 18.2
  npmPackages:
    @storybook/addon-essentials: 8.5.2 => 8.5.2 
    @storybook/addon-links: 8.5.2 => 8.5.2 
    @storybook/addon-storysource: 8.5.2 => 8.5.2 
    @storybook/blocks: 8.5.2 => 8.5.2 
    @storybook/test: 8.5.2 => 8.5.2 
    @storybook/vue3: 8.5.2 => 8.5.2 
    @storybook/vue3-vite: 8.5.2 => 8.5.2 
    eslint-plugin-storybook: ^0.8.0 => 0.8.0 
    storybook: 8.5.2 => 8.5.2 
    storybook-vue3-router: ^5.0.0 => 5.0.0

Additional context

No response

Metadata

Metadata

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions