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]: addon-interactions + disabled actions breaks storybook #19989

Closed
DzmVasileusky opened this issue Nov 28, 2022 · 7 comments · Fixed by #20783 or #21650
Closed

[Bug]: addon-interactions + disabled actions breaks storybook #19989

DzmVasileusky opened this issue Nov 28, 2022 · 7 comments · Fixed by #20783 or #21650

Comments

@DzmVasileusky
Copy link

Describe the bug

Steps:

  1. Generate nx/Angular/Storybook project.
  2. Disable actions in preview.js
export const parameters = {
    actions: { disable: true },
    viewMode: 'docs'
};
  1. Add interaction addon.
  2. Try to build.

Just try to build storybook in repo with nx run ui-kit:storybook

Actual:
Error: Minified React error #311 and some other errors
Endless storybook app loading

Expected:
No errors, app is loaded

To Reproduce

https://github.com/DzmVasileusky/storybook-bug-1

System

System:
    OS: macOS 11.2.3
    CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
  Binaries:
    Node: 16.15.0 - ~/.nvm/versions/node/v16.15.0/bin/node
    npm: 8.10.0 - ~/.nvm/versions/node/v16.15.0/bin/npm
  Browsers:
    Chrome: 107.0.5304.110
    Firefox: 106.0.5
    Safari: 14.0.3
  npmPackages:
    @storybook/addon-a11y: ^6.5.13 => 6.5.13 
    @storybook/addon-essentials: ^6.5.13 => 6.5.13 
    @storybook/addon-interactions: ^6.5.13 => 6.5.13 
    @storybook/addon-jest: ^6.5.13 => 6.5.13 
    @storybook/addons: ^6.5.13 => 6.5.13 
    @storybook/angular: ^6.5.13 => 6.5.13 
    @storybook/builder-webpack5: ^6.5.13 => 6.5.13 
    @storybook/core-server: ^6.5.13 => 6.5.13 
    @storybook/jest: ^0.0.10 => 0.0.10 
    @storybook/manager-webpack5: ^6.5.13 => 6.5.13 
    @storybook/test-runner: ^0.9.1 => 0.9.1 
    @storybook/testing-library: ^0.0.13 => 0.0.13 
    @storybook/theming: ^6.5.13 => 6.5.13

Additional context

No response

@shilman
Copy link
Member

shilman commented Dec 12, 2022

Please try upgrading to the latest prerelease:

npx storybook@next upgrade --prerelease

Does that fix it?

@ghost
Copy link

ghost commented Jan 16, 2023

@shilman Upgraded to prelease and it still breaks storybook

@ghost
Copy link

ghost commented Jan 16, 2023

Looks like there was a suggested fix here but never merged : #19069

@shilman
Copy link
Member

shilman commented Feb 4, 2023

Jeepers creepers!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.0-beta.42 containing PR #20783 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb@next upgrade --prerelease

@expspace
Copy link

expspace commented Mar 1, 2023

@shilman just tested with "^7.0.0-beta.54" and issue still occurs with error

Uncaught Error: Rendered fewer hooks than expected. This may be caused by an accidental early return statement.
    at renderWithHooks (chunk-7WUZ4646.mjs:69:1937)
    at updateFunctionComponent (chunk-7WUZ4646.mjs:69:48263)
    at updateSimpleMemoComponent (chunk-7WUZ4646.mjs:69:46640)
    at beginWork (chunk-7WUZ4646.mjs:71:23530)
    at HTMLUnknownElement.callCallback2 (chunk-7WUZ4646.mjs:2:1922)
    at Object.invokeGuardedCallbackDev (chunk-7WUZ4646.mjs:2:2446)
    at invokeGuardedCallback (chunk-7WUZ4646.mjs:2:3704)
    at beginWork$1 (chunk-7WUZ4646.mjs:90:39484)
    at performUnitOfWork (chunk-7WUZ4646.mjs:90:21018)
    at workLoopSync (chunk-7WUZ4646.mjs:90:20642)

@shilman
Copy link
Member

shilman commented Mar 22, 2023

Gadzooks!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.0-rc.6 containing PR #21650 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb@next upgrade --prerelease

@expspace
Copy link

Thanks, tried on "^7.0.0-rc.7" and it's fixed.

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