storybook
storybook copied to clipboard
[Bug]: addon-interactions + disabled actions breaks storybook
Describe the bug
Steps:
- Generate nx/Angular/Storybook project.
- Disable actions in
preview.js
export const parameters = {
actions: { disable: true },
viewMode: 'docs'
};
- Add interaction addon.
- 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
Please try upgrading to the latest prerelease:
npx storybook@next upgrade --prerelease
Does that fix it?
@shilman Upgraded to prelease and it still breaks storybook
Looks like there was a suggested fix here but never merged : https://github.com/storybookjs/storybook/pull/19069
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 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)
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
Thanks, tried on "^7.0.0-rc.7" and it's fixed.