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

I have followed the Integrate Bootstrap and Storybook. Fails on Sass implementation #554

Open
cbrown11 opened this issue Jun 5, 2023 · 4 comments
Assignees

Comments

@cbrown11
Copy link

cbrown11 commented Jun 5, 2023

Details

Recipe Page: bootstrap
Recipe Template: bootstrap
Browser: Angular v14 /v15

What is wrong

Everything work fine when there is css in the component but as soon as I change to sass. I get the error below:

All get the error:

Error: Cannot read properties of undefined (reading 'match')
  at ShadowCss.shimCssText (/vendors-node_modules_storybook_addon-essentials_dist_actions_preview_mjs-node_modules_storybo-b850d7.iframe.bundle.js:21015:30))
  at /vendors-node_modules_storybook_addon-essentials_dist_actions_preview_mjs-node_modules_storybo-b850d7.iframe.bundle.js:32450:22
  at Array.map (<anonymous>))
  at compileStyles (/vendors-node_modules_storybook_addon-essentials_dist_actions_preview_mjs-node_modules_storybo-b850d7.iframe.bundle.js:32449:17))
  at compileComponentFromMetadata (/vendors-node_modules_storybook_addon-essentials_dist_actions_preview_mjs-node_modules_storybo-b850d7.iframe.bundle.js:31975:76))
  at CompilerFacadeImpl.compileComponentFromMeta (/vendors-node_modules_storybook_addon-essentials_dist_actions_preview_mjs-node_modules_storybo-b850d7.iframe.bundle.js:32691:17))
  at CompilerFacadeImpl.compileComponent (/vendors-node_modules_storybook_addon-essentials_dist_actions_preview_mjs-node_modules_storybo-b850d7.iframe.bundle.js:32681:17))
  at MyButtonComponent.get (/vendors-node_modules_storybook_addon-essentials_dist_actions_preview_mjs-node_modules_storybo-b850d7.iframe.bundle.js:58090:37))
  at getComponentDef (/vendors-node_modules_storybook_addon-essentials_dist_actions_preview_mjs-node_modules_storybo-b850d7.iframe.bundle.js:37167:14))

Screenshots

The new Bootstrap component works fine with css file

image

Any component(s) that has a scss file, instead of css file has the following error:

image

@cbrown11 cbrown11 changed the title I have followed the Integrate Bootstrap and Storybook. Works but other simple components now fail I have followed the Integrate Bootstrap and Storybook. Works but other simple dummy components now fails Jun 5, 2023
@winkerVSbecks
Copy link
Contributor

@cbrown11 this is the repository for Storybook docs. It's not a support channel. Please join our Discord for support https://discord.gg/storybook and refer to the How to get help channel

@cbrown11 cbrown11 changed the title I have followed the Integrate Bootstrap and Storybook. Works but other simple dummy components now fails I have followed the Integrate Bootstrap and Storybook. Fails on Sass implementation Jun 5, 2023
@cbrown11
Copy link
Author

cbrown11 commented Jun 5, 2023

I just clicked on "Report an Issue" on the page https://storybook.js.org/recipes/bootstrap

@winkerVSbecks
Copy link
Contributor

🤦🏽‍♂️ so sorry, I totally missed the top bit about it being related to a recipe. I'll reopen and assign it.

@ShaunEvening
Copy link
Contributor

Hey @cbrown11, this seems to be a problem with how the angular sets up the styleUrls for components. You can follow along with this issue: storybookjs/addon-styling#41

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