storybook icon indicating copy to clipboard operation
storybook copied to clipboard

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

Open DzmVasileusky opened this issue 2 years ago • 3 comments

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

DzmVasileusky avatar Nov 28 '22 16:11 DzmVasileusky

Please try upgrading to the latest prerelease:

npx storybook@next upgrade --prerelease

Does that fix it?

shilman avatar Dec 12 '22 02:12 shilman

@shilman Upgraded to prelease and it still breaks storybook

ghost avatar Jan 16 '23 23:01 ghost

Looks like there was a suggested fix here but never merged : https://github.com/storybookjs/storybook/pull/19069

ghost avatar Jan 16 '23 23:01 ghost

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

shilman avatar Feb 04 '23 04:02 shilman

@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)

expspace avatar Mar 01 '23 21:03 expspace

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

shilman avatar Mar 22 '23 17:03 shilman

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

expspace avatar Mar 24 '23 19:03 expspace