Frustrating 'compile' errors

Just want to mention this, because it is very frustrating…

A number of times I have written code same as video and received compile errors, when I make code changes to debug persist, but when I refresh go away.

Problem is that it’s hard to capture these because often I have made errors that it is properly flagging so I don’t know when it’s a false positive and the error state should be captured.

Actually…I have an instance…but I cannot upload it because zScalar won’t let me upload an image…

Orthogonal issue - If there is anyway for you to catch that zScalar stops an upload it would be great if the error alert said, “zScalar stopped the image paste/upload. Ask your IT/Admin to whitelist VizHub.com.

Got IT to resolve zScalar issue.

I’m getting better at recognizing them… happened again here.

Refresh and it went away.

At this point any edit causes it to fail to compile at the “return (” with a refresh having it draw. See below for browser errors.

There is a syntax error here:

It is missing the closing " on textAnchor. As it does not need to be quoted, I suggest that it should read:

style={{textAnchor: 'middle'}}

VizHub does not re-build the code on page load, so that’s why it shows up if you refresh. It only re-builds the code after you make an edit, at which point it detects the syntax error.

I saw that after posting, and fixed it. But even with that fixed, this code says it cannot compile at the return but does on a refresh.

For instance here it was rendered. I added the “// Comment” line. Got the couldn’t compile at the return. Refreshing renders the page again.

There’s probably another syntax error.

Can you please share the link? Thanks!

Will be interesting to see if you get same result. See if it’s a browser/internet issue. If not, then why does it render on refresh? Would assume compile error would stick till fixed.

Looks like it’s another syntax error.

Interestingly, the dev tools console shows a better error message than the one shown in the visual output. This looks like a bug in VizHub, maybe. I would prefer to see the better message in the visual output. Will investigate. Thanks for reporting!

Is this in your browser? If so, if you hit Refresh does it compile and render?

Yes. I forked it so I could edit, then added a space in the code to trigger a re-build, then I see the error.

Just refreshing the page does not trigger a re-build, so it renders the stale build on page reload.

Oh. That’s what confused me then. That I could get what looked like a working version on a refresh. Wasn’t obvious, then that it was still broken. Looked like it worked.

Yeah, the fact that it uses the old build on refresh is definitely confusing.

Maybe I could make a change where it uses the old build initially, but then always triggers a re-build from the latest code when you open the editor.

OR, maybe it should clear out the old build if the new build is broken. Actually that might be the least confusing option - once it breaks, it’s broken on refresh as well (that’s the desired behavior).

Any thoughts on the best way to do it?

Would clear the old build…

if it looks like it built, user is left wondering why their edits didn’t work (my situation) and they don’t know to go look at dev tools.

If you want to be nice can have a button to show the last good build, just in case they want to show it to someone. “See! I got this far before I borked it again!”


I had to come here to post this. When I tried to reply via email I received.

Thanks for the feedback!