Storybook 6.1.0-rc.4 & Emotion 11.0 support
See original GitHub issueDescribe the bug When you upgrade emotion (@emotion/css) to version 11.0 - storybook seems to build successfully, but on every single set of stories, simply renders this error screen:
To Reproduce
- Init a basic storybook
- Install
@emotion/css
and@emotion/babel-plugin
- setup a basic component which uses { css } from
@emotion/css
- do
npm run build-storybook
- See error:
css is not defined
ReferenceError: css is not defined
...
Code snippets
//./storybook/main.js
module.exports = {
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-knobs',
],
typescript: { reactDocgen: 'react-docgen' },
};
System
$ npx sb@next info
Environment Info:
System:
OS: macOS 10.15.7
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Binaries:
Node: 14.15.1 - ~/.nvm/versions/node/v14.15.1/bin/node
Yarn: 1.19.0 - /usr/local/bin/yarn
npm: 6.14.8 - ~/.nvm/versions/node/v14.15.1/bin/npm
Browsers:
Chrome: 86.0.4240.198
Edge: 86.0.622.69
Firefox: 82.0.3
Safari: 14.0.1
npmPackages:
@storybook/addon-actions: ^6.1.0-rc.4 => 6.1.0-rc.4
@storybook/addon-essentials: ^6.1.0-rc.4 => 6.1.0-rc.4
@storybook/addon-knobs: ^6.1.0-rc.4 => 6.1.0-rc.4
@storybook/addon-links: ^6.1.0-rc.4 => 6.1.0-rc.4
@storybook/react: ^6.1.0-rc.4 => 6.1.0-rc.4
Issue Analytics
- State:
- Created 3 years ago
- Reactions:39
- Comments:59 (18 by maintainers)
Top Results From Across the Web
Storybook 6.1.0-rc.4 & Emotion 11.0 support #13145 - Issuehunt
Describe the bug When you upgrade emotion (@emotion/css) to version 11.0 - storybook seems to build successfully, but on every single set of...
Read more >Storybook 6.1
Storybook is the industry standard UI component workshop. It organizes components and their states to structure UI development, testing, ...
Read more >@storybook/react | Yarn - Package Manager
Storybook for React: Develop React Component in isolation with Hot Reloading. ... Support Angular 15.0.4 #20287; CLI: execute automigrations when pressing ...
Read more >Using Storybook 6.1 with Next.js and Emotion 11
Overview. We've added Storybook side-by-side with our Next.js application. It took us about 4 days of intensive work.
Read more >storybook導入時にエラーと戦ったので忘備録 - Qiita
storybook を導入する時にエラーが出て、なかなか実装が進まなかったため忘備録です。 環境. Next.js: 12.1.0 chakra-ui: 1.8.6 emotion: 11 storybook: ...
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
FYI we are working on a proper fix for this–not a workaround–hopefully arriving in the next few days.
Hurrah!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.5.0-alpha.31 containing PR #17000 that references this issue. Upgrade today to the
@next
NPM tag to try it out!Closing this issue. Please re-open if you think there’s still more to do.