-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Uncaught TypeError: (0 , _addonViewport.configure) is not a function #3322
Comments
You're using an old version ( It's also recommended to use the same version of all storybook packages, as using different versions was not tested |
@mshaaban088 , WDYT about changing it to the |
On one hand it makes a lot of sense, but on the other hand it looks But I'm totally ok with renaming it to avoid conflicts with storybook's |
I think it will be a good change for the naming convention between the addons. Think of having a |
That's why I'm totally ok to change it 😉 |
igor-dv's statement: "Think of having a configure function in 15 other addons at a time (there is already a configureA11y)... " is spot on. We already have a |
PS: the upgrade to |
Have you upgraded |
Please see configure function |
I'm gonna wait till you're not bleeding edge... it works fine with 'register' . But if I want to add any configurations, the whole thing blows up. I'll keep watching, but I don't have time to mess with this right now. |
I am on version 3.4.4 for Storybook but also the viewport addon.
Everything runs fine, except for the viewport addon. It exports nothing for me. addons.js
config.js
But also when I try the default import or named import, there is nothing available.
or
Is it necessary to upgrade everything to an unstable 4.0.0 alpha in order to get it right? @westandy were you able to fix it? :) |
So to answer your question, yes it's necessary to upgrade |
Thank you @mshaaban088 Looking really forward to the official 4.0 release. Is there any timeline when this will happen? I would lobe to cover the viewport add-on in an article of mine :) |
I upgraded to 4.0.0-alpha.1 and I'm still getting Could it be that the documentation is outdated and I'm doing something wrong? |
The documentation says install using
which will not install the alpha version. But the rest of the documentation is with respect to the alpha version. Should the public facing documentation be about the alpha version functionality? |
Doc says adding a new viewport is not supported in 3.4.11 |
In my storybooks-config folder, I have an
addons.js
file with a single line:import test from '@storybook/addon-viewport/register';
I am running storybook with
@storybook/react
and I wanted to addviewport
:import {configure as viewport, INITIAL_VIEWPORTS} from '@storybook/addon-viewport';
This is what is in my
package.json
:The view port shows up as long as I don't try to run
viewport(..)
. However, when I used your example code to add the kindle viewports, I get the error stated in the subject:Uncaught TypeError: (0 , _addonViewport.configure) is not a function
What am I doing wrong?
The text was updated successfully, but these errors were encountered: