storybook-eol / storybook-addon-options

REPO/PACKAGE MOVED - Storybook UI Options Addon
https://github.com/storybooks/storybook/tree/master/addons/options
30 stars 7 forks source link

Error using storyshots #17

Open fdaciuk opened 7 years ago

fdaciuk commented 7 years ago

I'm using storybook-readme and storyshots on my project. When I try to run storyshots -c storybook on terminal, I get this error:

TypeError: Cannot read property 'emit' of null
    at setOptions (/code/my-project/node_modules/@kadira/storybook-addon-options/dist/preview/index.js:27:10)
    at evalmachine.<anonymous>:20:39
    at runWithRequireContext (/code/my-project/node_modules/@kadira/storyshots/dist/require_context.js:104:3)
    at _callee$ (/code/my-project/node_modules/@kadira/storyshots/dist/cli.js:29:43)
    at tryCatch (/code/my-project/node_modules/regenerator-runtime/runtime.js:64:40)
    at Generator.invoke [as _invoke] (/code/my-project/node_modules/regenerator-runtime/runtime.js:299:22)
    at Generator.prototype.(anonymous function) [as next] (/code/my-project/node_modules/regenerator-runtime/runtime.js:116:21)
    at step (/code/my-project/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
    at /code/my-project/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:14
    at F (/code/my-project/node_modules/core-js/library/modules/_export.js:35:28)
error Command failed with exit code 1.
error Command failed with exit code 1.

My storybook config files (click to open):

config.js ```js import { configure, addDecorator, setAddon } from '@kadira/storybook' import GithubCorner from '@personare/react-storybook-decorator-github-corner' import InfoAddon from '@kadira/react-storybook-addon-info' import { setOptions } from '@kadira/storybook-addon-options' addDecorator(GithubCorner) setAddon(InfoAddon) setOptions({ downPanelInRight: true }) const req = require.context('../src/components', true, /\.story\.js$/) function loadStories () { req.keys().forEach((filename) => req(filename)) } configure(loadStories, module) ```
addons.js ```js import '@kadira/storybook/addons' import '@kadira/storybook-addon-options/register' import 'storybook-readme/register' ```

Any ideas?

cc @mnmtanish @arunoda