Strange Error - D3 underlined in red?

Hi,

I have noticed since i came back to vizhub, that most of my imports are underlined in red in the code editor, yet they work, as can be seen in the image below:

  1. Why are the imports underlined in red? Am I doing something wrong?
  2. How are they red, yet still work?
  3. Also, how can i make the code screen fullwidth and hide the preview page, and only show it at will?
  4. Also, also, how do we debug, is thee a debugger now?

VizHub is looking good.

My repo is public, so you can go here to check this out.

1 Like

Thanks for reporting! Indeed, VizHub was completely re-written and the new version launched in January. There are lots of moving parts, and feedback like this is extremely helpful.

  1. The linting warnings you are seeing should not be there. It’s a bug in VizHub. I created a new issue in the open source editor VZCode for this particular problem, and I hope to solve it soon: https://github.com/vizhub-core/vzcode/issues/621
  2. The red underlines are what’s called “Linting Warnings” provided by the TypeScript Language Server. They are not runtime errors, they are just code checks that happen before it even runs. These warnings are not connected to the runtime, and in this case are overly aggressive, because the code still works. I hope to make the change soon so that this unnecessary warning does not show up.
  3. This is a great idea, and is a feature regression from V2. I hope to implement this soon. I’ve created this issue to track it: https://github.com/vizhub-core/vizhub-feedback/issues/800 This is work in progress and you can sort of do it by manually adding mode=hide to the URL, but there is more work to be done.

  1. For debugging, the Chrome DevTools are the recommended approach. If the index.js approach is used, I believe line numbers should resolve correctly to the original source files. If not, please let me know.

VizHub is looking good.

Thank you so much! I’m glad you are finding it useful.

The issue of the red underline has been solved! We deployed a fix that conditionally disables that linting rule if it’s the V2 Runtime.

Details here:

1 Like