-
Notifications
You must be signed in to change notification settings - Fork 97
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
Cannot read property 'preference' of undefined inside Storybook #69
Comments
@farnabaz do you mind checking when you have 5 min? |
I think I just fixed this issue, but I made many change on the storybook config, so I'm not sure how I did... But maybe it's work just only with this file
|
|
@Atinux i have the same issue after upgrading from 2.0.5 to 2.0.7 my settings is colorMode: {
storageKey: 'color-mode',
preference: 'system',
fallback: 'dark',
classSuffix: '',
} and in my tailwind.config.js i have
|
Hi @kgnfth Please use |
Thx it works 💙 |
I'm having the same problem, I used the 2.0.8 version but the error still occurs in Storybook, any idea? |
Did you try the |
Yes I did, I was workinf with 2.0.10, then I downgrade and same thing. This error was gone when I applied what @ManUtopiK mention |
@Atinux is there a cleaner way as to not have to eject and keep using the module way of doing things with nuxtjs? while the solution provided by @ManUtopiK works it forces us to have the config in the |
Cc @farnabaz |
@gimyboya Using New versions of module is not compatible with Storybook because it uses |
cc @danielroe on it too |
* closes #69 Co-authored-by: Sébastien Chopin <seb@nuxtjs.com>
Version
@nuxtjs/color-mode: ^2.0.3
nuxt: ^2.14.12
@nuxtjs/storybook: ^3.3.1
Steps to reproduce
Install nuxt with @nuxtjs/color-mode and @nuxtjs/storybook.
What is actually happening?
I run nuxt as
target: static
. Everything works fine withyarn dev
.I can launch Storybook and got it at localhost:3003, but inside the main frame of Storybook, there is this error:
Cannot read property 'preference' of undefined
.I tried everything related in #21 and #25 without success...
The text was updated successfully, but these errors were encountered: