react-theming / storybook-addon-material-ui

Addon for storybook wich wrap material-ui components into MuiThemeProvider. :page_with_curl: This helps and simplifies development of material-ui based components.
https://github.com/sm-react/storybook-addon-material-ui
MIT License
567 stars 131 forks source link

'yarn start storybook' doesnt find storybook-addon-material-ui #70

Closed Eurythmax closed 6 years ago

Eurythmax commented 6 years ago

Hello guys, I tried to install this plugin with yarn. After installing and adding the addons.js file i got a lof of errors. Something like this

ERROR in ./node_modules/storybook-addon-material-ui/dist/components/ThemePanel.js
Module not found: Error: Can't resolve 'material-ui/svg-icons/file/file-download' in '../quesentation/node_modules/storybook-addon-material-ui/dist/components'

my current config.js

import { configure } from '@storybook/react';
import {muiTheme} from 'storybook-addon-material-ui';

storiesOf('Material-UI', module)
// Add the `muiTheme` decorator to provide material-ui support to your stories.
// If you do not specify any arguments it starts with two default themes
// You can also configure `muiTheme` as a global decorator.
  .addDecorator(muiTheme());

// automatically import all files ending in *.stories.js
const req = require.context('../stories', true, /.stories.js$/);
function loadStories() {
  req.keys().forEach((filename) => req(filename));
}

configure(loadStories, module);

and my current addons.js

import 'storybook-addon-material-ui';

Thanks for your help