-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Storybook does not load on browser: Accessing non-existent addons channel error #17852
Comments
I have the same problem with 6.4.20, if I use 6.4.19 and I don't upgrade everything works correctly for me. In my case It seems the problem is with the addon: |
Yes same, 6.4.19 works... thing is, I can't seem to call sb init with a specific version... how do we install a specific version of storybook? |
@yoanne2x you need to edit your For example:
However, I am able to replicate this bug even in |
As a temporary workaround, I am able to solve this by removing |
@shilman the same thing happens with the addon '@storybook/addon-a11y' , in my case deleting that one worked |
I also found that if I enable the on-demand store with @IanVS @joshwooding I think what's going on is this line, which matches webpack: Versus this file, which does not set up the channel at the very beginning: Here's the code that chooses one or the other: I suspect adding the |
Thanks for the investigation and suggestion @shilman. I've put up a PR in the vite builder that I believe should address this, although I'm open to any other suggestions of a "better" fix as well. |
@yoanne2x @jambsik This has been fixed in @storybook/[email protected]. Please try it out and let us know whether it does the trick. Thanks for filing the report! |
I guess I am late to this party, and I am a little confused about what the vite builder does exactly in the v6 case, but here is where the relevant code is for webpack (in the storybook/lib/core-client/src/preview/start.ts Lines 55 to 59 in 894fd20
Does the vite builder end up calling |
@tmeasday we call the framework |
Whoops, no different
So, with that in mind, if you are calling into that file ( |
It might have just been an order thing. In the webpack builder, we do:
So the issue you were having might have been from not having an explicit step 1 here. |
So, there's the conundrum @tmeasday. If we import the framework at the start of the process (like we used to) before the preview entries, then we ended up with #17773. I moved the call in storybookjs/builder-vite#289 to address that issue, and introduced this one. |
Describe the bug
created a storybook using vite builder on react app.
To Reproduce
System
Environment Info:
System:
OS: macOS 12.3
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Binaries:
Node: 14.19.1 - ~/.nvm/versions/node/v14.19.1/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.16 - ~/.nvm/versions/node/v14.19.1/bin/npm
Browsers:
Chrome: 100.0.4896.60
Safari: 15.4
npmPackages:
@storybook/addon-actions: ^6.4.20 => 6.4.20
@storybook/addon-essentials: ^6.4.20 => 6.4.20
@storybook/addon-interactions: ^6.4.20 => 6.4.20
@storybook/addon-links: ^6.4.20 => 6.4.20
@storybook/builder-vite: ^0.1.22 => 0.1.22
@storybook/react: ^6.4.20 => 6.4.20
@storybook/testing-library: 0.0.9 => 0.0.9
Additional context
client.ts:16 [vite] connecting...
client.ts:53 [vite] connected.
index.js:49 Error: Accessing non-existent addons channel, see https://storybook.js.org/basics/faq/#why-is-there-no-addons-channel
at AddonStore2.getChannel (index.js:30:13)
at new Instrumenter (instrumenter.js?v=a5fb0150:174:27)
at instrument (instrumenter.js?v=a5fb0150:852:69)
at argsEnhancers.js:29:19
warn @ index.js:49
(anonymous) @ index.js:76
instrument @ instrumenter.js?v=a5fb0150:859
(anonymous) @ argsEnhancers.js:29
index.js:30 Uncaught Error: Accessing non-existent addons channel, see https://storybook.js.org/basics/faq/#why-is-there-no-addons-channel
at AddonStore2.getChannel (index.js:30:13)
at argsEnhancers.js:36:22
AddonStore2.getChannel @ index.js:30
(anonymous) @ argsEnhancers.js:36
iframe.html?id=*&viewMode=story:54 POST http://localhost:6006/runtime-error 404 (Not Found)
The text was updated successfully, but these errors were encountered: