Notebook local hosting not fully served/working

Hey Everyone,

I’ve been trying to run an observable notebook locally after using the download code feature and can’t figure out where I’m going wrong. I don’t have any attached files in the notebook.

I downloaded the zipped file, uncompressed it using 7zip, and got the standard contents as I’ve seen in other posts.

I then used npm http-server to run a simple web server in the folder, and got this in the browser (chrome):

I found this example examples/standalone at main · observablehq/examples · GitHub, but as I understand the unzipped file should be able to be hosted straightaway without any of the extra steps in this example.

Any ideas what’s going wrong?

Can you link to the notebook (or something that doesn’t work which you’re willing to share)?

Just did the same process with this random notebook I found: Matthias D3 | Simple bar-chart with tooltip-hover / nordea / Observable

Also should say that I npm installed the observable runtime, so still bit confused as to what’s wrong.

I’m not getting any errors when I open the downloaded code for that notebook locally. And your screenshot doesn’t show any errors either.

Sorry, I might have been unclear. Can you post a link to a notebook which suffers from the same issue / error as in your original post?

Ah, perhaps I think I was expecting the notebook to be much closer to what it looks like when you view it on observablehq.com. Is the screenshot I showed for the simple bar chart expected behavior?

Yes, it is. You can adjust the output by writing a custom inspector, see this tutorial (and maybe the custom inspector factory in this old notebook might help).

1 Like

Great! I think embedding the entire notebook will work for what I need, thanks.