Skip to content
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 'use' of undefined #13

Closed
Kazimirkas opened this issue Apr 23, 2021 · 7 comments
Closed

Cannot read property 'use' of undefined #13

Kazimirkas opened this issue Apr 23, 2021 · 7 comments

Comments

@Kazimirkas
Copy link

Kazimirkas commented Apr 23, 2021

Storybook 6.2.9

ERR! TypeError: Cannot read property 'use' of undefined
ERR! at Object.webpackFinal (...node_modules/storybook-css-modules-preset/index.js:21:24)

@nalejandroveron
Copy link
Owner

I may need a repo example, I think that maybe this plugin is conflicting with some other you have installed

@clintandrewhall
Copy link

clintandrewhall commented Apr 25, 2021

I'm getting this, too, using Create React App. I'll likely have an example later today, or this week. You might be able to repro by creating a new CRA, then npx sb init, and then add the rule to main.js...?

@nalejandroveron
Copy link
Owner

I'll give it a shot!

@clintandrewhall
Copy link

FWIW, while there's an investigation: this solved the issue for me.

storybookjs/storybook#2320 (comment)

@Kazimirkas
Copy link
Author

Kazimirkas commented Apr 26, 2021

I may need a repo example, I think that maybe this plugin is conflicting with some other you have installed

I am also using the CRA and also the following addons addons: [ "storybook-css-modules-preset", "@storybook/addon-links", "@storybook/addon-essentials", "@storybook/preset-create-react-app", "@storybook/addon-a11y", ],
Nothing special else. FYI, I am not using SCSS

@Kazimirkas
Copy link
Author

Screenshot 2021-04-26 at 09 04 04

@Kazimirkas
Copy link
Author

@Negan1911 I Sorry, I was not attentive. CSS modules are working with the storybook and RCA under the hood already because of RCA webpack configuration. No need of additional addons. You may close the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants