5.0.0-rc4 - cannot read property 'secondary' of undefined
See original GitHub issueDescribe the bug
In 5.0.0-rc4, the storybook UI fails to load, throwing cannot read property 'secondary' of undefined, while trying to read theme.color.secondary in node_modules/@storybook/ui/dist/components/layout/draggers.js. The provided theme object is empty.
I’m seeing this even if I wipe out my custom webpack config and use the default storybook config, with no addons.
If I downgrade to rc3, the problem goes away.
Screenshots
System:
- OS: MacOS 10.14.1
- Device: Macbook Pro 2016
- Browser: chrome & safari
- Framework: react
- Addons: None
- Version: Storybook 5.0.0-rc4 (but not 5.0.0-rc3), with React 16.8.1
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:44 (26 by maintainers)
Top Results From Across the Web
Jest: Cannot read property 'secondary' of undefined - after MUI ...
We upgraded MUI from v4 to v5 and we have UI tests which started failing. Error is: TypeError: Cannot read property 'secondary' of...
Read more >Error: Cannot read property "0" from undefined,Detail
Hello Guys , I have created on flow action . whenever I run it first time it is throwing error" Error: Cannot read...
Read more >How to Prevent the Error: Cannot Read Property '0' of Undefined
A guide on how to prevent the error "cannot Read Property '0' of Undefined", covering techniques such as try, catch, using const over...
Read more >Cannot read properties of undefined (reading 'type') - MongoDB
I am getting an error similar to TypeError: Cannot read properties of undefined (reading 'startsWith') with a different variable but same ...
Read more >Cannot read property 'timeStarted' of undefined - Bugs - Drone
Hello, I tried to connect Drone:2.0.1 to GITEA and everything worked fine. I then connected the same instance to GITHUB (changed git ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ahh, gotcha. FWIW, I can work around the issue by adding an explicit dependency for
@storybook/themingin my package.jsonFor anyone running into the
EntryModuleNotFoundError(I landed here while Googling / troubleshooting) I want to point out that it sounds like this is specific to yarn and that @jdelStrother’s recommendation fixed it for me:📝 I’m also not using any custom theming. I did try blowing away
node_modulesand evenyarn.lock. Still had the same issue with5.0.0.yarn add -D @storybook/themingdid the trick.FWIW here is my entire diff (minus lock file) for upgrading a project from
4.x->5.0.0just now. Thank you to all who were involved in this effort! Seriously great work 😃