Storybook: Improve error reporting with `react-error-overlay`

Created on 21 May 2017  路  22Comments  路  Source: storybookjs/storybook

Most helpful comment

Mine. PR soon.

All 22 comments

Mine. PR soon.

@MrBoolean Are you still interested in adding this to storybook?

Hi, I would like to solve this.
This is my first open source contribution, So could you guide me in this?

I have cloned the repo.

Thanks @thongdong7. I get a fair idea about will let you know once it done.

@ijajmulani YES definitely I can help you, I can tell you about the codebase and help you find what you need.

Can you join our slack?
https://now-examples-slackin-nqnzoygycp.now.sh/
That way we can chat a bit more easily.

@ndelangen thanks for sending slack request. I have joined storybook on slack.

Any update on this? Is this difficult to add manually?

You could start to use it by creating a global decorator: https://gist.github.com/Spy-Seth/25bdaf2a6aa8c37228d47db79cfd0977

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 60 days. Thanks!

@Spy-Seth Looks like you might be able to make a PR, adding this for everyone? 馃檱

Did you mean to add the gist as an official decorator inside storybook mono-repo? Or to activate react-error-overlay by default?

Activate it by default seems good to me, do you agree?

In the preview view it's a good idea yes.

I just need to find where to it in the source code 馃槃

I'd assume it's something you configure in the webpack.config.js ?

That'd be located here:
https://github.com/storybooks/storybook/blob/master/app/react/src/server/config/webpack.config.js

The webpack stuff got moved to a new package core, should not be to difficult to find though.

Are you still interested in making a PR @Spy-Seth ?

after looking at how create-react-app now does things i am not confident that react-error-overlay is all that is needed for this stuff. do we need [webpackHotDevClient](https://github.com/facebook/create-react-app/blob/25184c4e91ebabd16fe1cde3d8630830e4a36a01/packages/react-dev-utils/webpackHotDevClient.js)? when i tried implementing just react-error-overlay, nothing happened when i intentionally threw an error on my storybook. it seems that webpackHotDevClient reexports ErrorOverlay anyway so it looks like i just need to make that work. Now i have no idea how to configure webpackHotDevClient as just adding it to my webpack.config.js doesn't do anything.

future people looking at this - this is solved with the undocumented middleware.js option. https://github.com/storybooks/storybook/issues/2890

might look into doing a PR for this to make it default behavior in storybook

@sw-yx sure, go for it!

done!

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 60 days. Thanks!

i believe this was merged so someone should close this as resolved (i can't)

for people from the future: the actual issue was switched to https://github.com/storybooks/storybook/pull/2941

Was this page helpful?
0 / 5 - 0 ratings