storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
83.42k stars 9.12k forks source link

[Bug]: Cannot read properties of null (reading 'useContext') #27526

Open rizwanahmed-tr opened 1 month ago

rizwanahmed-tr commented 1 month ago

Describe the bug

I have encountered this when i have tried to use autodocs after migrating to storybook v8 sb error

Reproduction link

https://bed4-103-170-179-30.ngrok-free.app

Reproduction steps

Go to any component and click on docs above error will appear

System

Storybook Environment Info:

  System:
    OS: Windows 11 10.0.22631
    CPU: (12) x64 12th Gen Intel(R) Core(TM) i7-1265U
  Binaries:
    Node: 18.15.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\OneDrive\Desktop\workspace\everest\node_modules\.bin\yarn.CMD <----- active
    npm: 9.5.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (124.0.2478.67)
  npmPackages:
    @storybook/addon-a11y: ^8.1.5 => 8.1.5
    @storybook/addon-actions: ^8.1.5 => 8.1.5
    @storybook/addon-console: ^3.0.0 => 3.0.0
    @storybook/addon-essentials: ^8.1.5 => 8.1.5
    @storybook/addon-knobs: ^8.0.0 => 8.0.0
    @storybook/addon-webpack5-compiler-babel: 3.0.3 => 3.0.3
    @storybook/react: ^8.1.5 => 8.1.5
    @storybook/react-webpack5: ^8.1.5 => 8.1.5
    react-storybook-addon-backgrounds: ^0.0.7 => 0.0.7
    storybook: ^8.1.5 => 8.1.5
    storybook-addon-jsx: ^7.3.14 => 7.3.14
    storybook-addon-outline: ^1.4.2 => 1.4.2
    storybook-addon-remix-react-router: ^3.0.0 => 3.0.0

Additional context

No response

vanessayuenn commented 1 week ago

@rizwanahmed-tr the repro you provided doesn't seem to work. Can you please create another one via storybook.new? Thank you! 🙏