#Cannot read properties of undefined (reading 'secondary')

8 messages · Page 1 of 1 (latest)

dusk jolt
#

Hello. I am having issues understanding an error

Cannot read properties of undefined (reading 'secondary')

You can see it live for yourself here:
https://scheduleonce.github.io/once-ui-react/?path=/docs/basic-button--docs

The repo code is here
https://github.com/scheduleonce/once-ui-react

Any lead will be appreciated
Thanks 👍

P.S. was also posted in the repo discussion area:
https://github.com/storybookjs/storybook/discussions/24505

GitHub

Oncehub React UI component library. Contribute to scheduleonce/once-ui-react development by creating an account on GitHub.

GitHub

Hello. I am having issues debuggin an error Cannot read properties of undefined (reading 'secondary') You can see it live for yourself here: https://scheduleonce.github.io/once-ui-react/?pa...

dusk jolt
#

Anyone has a clue ?

humble light
#

This can happen when there are mixed versions of storybook packages. Can you share the output of npx sb info?

dusk jolt
#

Definitely

Storybook Environment Info:

  System:
    OS: Linux 5.15 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
    CPU: (16) x64 AMD Ryzen 7 PRO 4750U with Radeon Graphics
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 18.13.0 - ~/.nvm/versions/node/v18.13.0/bin/node
    npm: 9.6.5 - ~/.nvm/versions/node/v18.13.0/bin/npm <----- active
  npmPackages:
    @storybook/addon-essentials: ^7.5.0 => 7.5.0
    @storybook/addon-interactions: ^7.5.0 => 7.5.0
    @storybook/addon-links: ^7.5.0 => 7.5.0
    @storybook/addon-styling: ^1.3.7 => 1.3.7
    @storybook/blocks: ^7.5.0 => 7.5.0
    @storybook/react: ^7.5.0 => 7.5.0
    @storybook/react-vite: ^7.5.0 => 7.5.0
    @storybook/testing-library: ^0.2.2 => 0.2.2
    eslint-plugin-storybook: ^0.6.15 => 0.6.15
    storybook: ^7.5.0 => 7.5.0
humble light
#

If that doesn't fix it, then my theory is wrong.

#

The other possibility is that scss is not being compiled correctly

#

I don't use scss personally, though. Does it render fine if you remove the Secondary story?