Storybook: TypeError: _ref2 is undefined

Created on 11 Mar 2020  路  15Comments  路  Source: storybookjs/storybook

Describe the bug
When I start storybook, it builds without error but it crashes in browser wiht the error

TypeError: _ref2 is undefined

The above error occurred in the <Manager> component:
    in Manager (created by Context.Consumer)
    in Location (created by QueryLocation)
    in QueryLocation (created by Root)
    in LocationProvider (created by Root)
    in HelmetProvider (created by Root)
    in Root

React will try to recreate this component tree from scratch using the error boundary you provided, LocationProvider.

To Reproduce
Steps to reproduce the behavior:

  1. Update SB to 6.0.0-alpha.24
  2. Start SB and go on your browser
  3. The page should be blank with an error message in console

Expected behavior
Storybook should start

Screenshots
image

System:

Environment Info:

  System:
    OS: Linux 4.15 Ubuntu 18.04.4 LTS (Bionic Beaver)
    CPU: (8) x64 Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
  Binaries:
    Node: 12.15.0 - /usr/bin/node
    npm: 6.13.4 - /usr/bin/npm
  Browsers:
    Chrome: 80.0.3987.106
    Firefox: 73.0
  npmPackages:
    @storybook/addon-a11y: ^6.0.0-alpha.24 => 6.0.0-alpha.24 
    @storybook/addon-docs: ^6.0.0-alpha.24 => 6.0.0-alpha.24 
    @storybook/addon-jest: ^6.0.0-alpha.24 => 6.0.0-alpha.24 
    @storybook/addon-knobs: ^6.0.0-alpha.24 => 6.0.0-alpha.24 
    @storybook/addon-viewport: ^6.0.0-alpha.24 => 6.0.0-alpha.24 
    @storybook/addons: ^6.0.0-alpha.24 => 6.0.0-alpha.24 
    @storybook/vue: ^6.0.0-alpha.24 => 6.0.0-alpha.24 
bug core

Most helpful comment

@shilman Well, can't figure out what I've done but this seem to be gone. I tried to remove node_modules and even package-lock.json, maybe one of this fixed it

All 15 comments

Sorry about that @jonhuteau -- this was due to a bad merge. Fixed and in the process of re-releasing now! 馃槵

隆Ay Caramba!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-alpha.25 containing PR #10106 that references this issue. Upgrade today to try it out!

You can find this prerelease on the @next NPM tag.

Closing this issue. Please re-open if you think there's still more to do.

@shilman Nice ! This one seems to be fixed. I can get a skeleton of Storybook UI but it throws another console error

Error: Singleton client API not yet initialized, cannot call addParameters

image

@jonhuteau make sure all your SB packages are upgraded to the latest alpha?

@shilman


Environment Info:

  System:
    OS: Linux 4.15 Ubuntu 18.04.4 LTS (Bionic Beaver)
    CPU: (8) x64 Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
  Binaries:
    Node: 12.15.0 - /usr/bin/node
    npm: 6.13.4 - /usr/bin/npm
  Browsers:
    Chrome: 80.0.3987.106
    Firefox: 73.0
  npmPackages:
    @storybook/addon-a11y: ^6.0.0-alpha.25 => 6.0.0-alpha.25 
    @storybook/addon-docs: ^6.0.0-alpha.25 => 6.0.0-alpha.25 
    @storybook/addon-jest: ^6.0.0-alpha.25 => 6.0.0-alpha.25 
    @storybook/addon-knobs: ^6.0.0-alpha.25 => 6.0.0-alpha.25 
    @storybook/addon-viewport: ^6.0.0-alpha.25 => 6.0.0-alpha.25 
    @storybook/addons: ^6.0.0-alpha.25 => 6.0.0-alpha.25 
    @storybook/vue: ^6.0.0-alpha.25 => 6.0.0-alpha.25 

@jonhuteau can you try deleting your node_modules and try again? cc @tmeasday

@shilman Yes, done already, and nothing changed

@jonhuteau do you have a repro? also can you file a separate issue on this so it's easier for people to find? (You're the second person who has run into this and I'm sure there will be more. Thanks!)

@shilman Well, can't figure out what I've done but this seem to be gone. I tried to remove node_modules and even package-lock.json, maybe one of this fixed it

I am getting this same error "Uncaught Error: Singleton client API not yet initialized, cannot call addParameters" all of a sudden.

I've tried deleting node_modules and reinstalling, but I'm still getting the error. My packages versions are:

"@storybook/addon-a11y": "^6.0.0-beta.2",
    "@storybook/addon-actions": "^6.0.0-beta.2",
    "@storybook/addon-docs": "^6.0.0-beta.2",
    "@storybook/addon-knobs": "^6.0.0-beta.2",
    "@storybook/addon-links": "^6.0.0-beta.2",
    "@storybook/addon-storysource": "^6.0.0-beta.2",
    "@storybook/addon-viewport": "^6.0.0-beta.2",
    "@storybook/addons": "^6.0.0-beta.2",
    "@storybook/preset-create-react-app": "^2.1.1",
    "@storybook/react": "^6.0.0-beta.2",
    "@storybook/theming": "^6.0.0-beta.2",

Anybody know what is causing this?

@koriner clear node_modules & reinstall? regenerate lockfile & reinstall?

@shilman Yeah I did that :|

@koriner got a repro repo i can look at?

@shilman I'll try and put something together over the weekend. Just doing that might help me find the problem anyway!

@shilman Well, can't figure out what I've done but this seem to be gone. I tried to remove node_modules and even package-lock.json, maybe one of this fixed it

It works for me. Thank you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

miljan-aleksic picture miljan-aleksic  路  3Comments

levithomason picture levithomason  路  3Comments

tlrobinson picture tlrobinson  路  3Comments

MrOrz picture MrOrz  路  3Comments

ZigGreen picture ZigGreen  路  3Comments