storybook-addon-console
storybook-addon-console copied to clipboard
[Bug] Errors when running on storybook 6
Describe the bug
If I add this addon to my storybook v6, it throws an error and storybook doesn't start-up.
Steps to reproduce the behavior
- Setup Storybook v6
- Set the addons to
addons: ['@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-console'],
- Run
start-storybook
- Error
Expected behavior
Shouldn't error.
Screenshots and/or logs
ERR! Error: Accessing non-existent addons channel, see https://storybook.js.org/basics/faq/#why-is-there-no-addons-channel
ERR! at AddonStore.getChannel (/Users/simeon.cheeseman/Development/settings-frontend/node_modules/@storybook/addons/dist/index.js:53:13)
ERR! at Object.actionHandler [as log] (/Users/simeon.cheeseman/Development/settings-frontend/node_modules/@storybook/addon-actions/dist/preview/action.js:23:34)
ERR! at console.logger.log (/Users/simeon.cheeseman/Development/settings-frontend/node_modules/@storybook/addon-console/dist/index.js:113:37)
ERR! at outputStartupInformation (/Users/simeon.cheeseman/Development/settings-frontend/node_modules/@storybook/core/dist/server/build-dev.js:253:11)
ERR! at buildDevStandalone (/Users/simeon.cheeseman/Development/settings-frontend/node_modules/@storybook/core/dist/server/build-dev.js:333:5)
ERR! at processTicksAndRejections (node:internal/process/task_queues:94:5)
Environment
- OS: OSX 11.2.2
- Node.js version: 15.9.0
- NPM version: 7.5.3
I have the same error, but in a different context. I can't install storybook-addon-console
because of "Accessing non-existent addons channel".
I'm running storybook with ember.
- ember-cli: 3.25.2
- node: 14.16.0
- os: darwin x64
Just add below line to the preview.js
import '@storybook/addon-console'
Its work for me😂
Don't put @storybook/addon-actions
into addons array, just create preview.js
and import it.
It's work for me (storybook v6.2.9).
// .storybook/main.js
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials'
],
// .storybook/preview.js
import '@storybook/addon-console';
Don't put
@storybook/addon-actions
into addons array, just createpreview.js
and import it. It's work for me (storybook v6.2.9).// .storybook/main.js addons: [ '@storybook/addon-links', '@storybook/addon-essentials' ],
// .storybook/preview.js import '@storybook/addon-console';
this won't work for newer storybook will it? uses module.export so
import '@storybook/addon-console'; is not valid.