knowbody / crra

Create Reason React App

Home Page:https://crra.now.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve errors display

knowbody opened this issue · comments

As per my comment here (#2 (comment)):

@aweary thanks! Yeah I noticed this as well, I'm actually working on the solution for the more visible error handling. I had a chat with @jordwalke and he suggested berror (which is included in reason-cli) to me. It has a very nice way of displaying errors, and suggesting the correction. Something similar to what Elm has.
If you want to try it out, install react-cli globally on your machine, and run:
bsb -make-world -w 2>&1 | berror --path-to-refmttype refmttype in one tab of the terminal and webpack-dev-server in the other.
As Jordan mentioned this works well most of the time but not always. Then you would fallback on the standard bsb errors. There's a room of improvement there for berror.
But what I'd like is something like redbox-react with the errors from berror displayed in the browser. So I don't need to check in terminal if the code actually compiled or not.

I would like these errors to be displayed in the browser, this is just an idea though. I will try to put together a PR with a proof of concept soon

added via #22