🏠 back to Observable

How to make the code dowloaded workin in a local application without network

Hello, I have a runtimeError for all my charts downloaded that I must use in a local application without any network. I make attention to load all the js needed in my local folder, so ? Is someone can help me please ? (it works very well with the network on)

chart = RuntimeError: NetworkError when attempting to fetch resource.
ViewOutput = RuntimeError: NetworkError when attempting to fetch resource.
viewof innerRadius = RuntimeError: NetworkError when attempting to fetch resource.

Please see our Standalone example:

1 Like

Thank you VERY MUCH Mike :hugs: :hugs: :hugs:, I forgot to tell the Observable runtime which files I wanted to use in the local directory !

// Initialize the Observable Runtime, telling it to use our local copy of D3
// rather than loading one from a CDN.
const runtime = new Runtime(new Library(name => {
switch (name) {
case “d3@6”: return “d3.v6.min”;
case “d3-require”: return “d3-require.min”;
case “d3-array”: return “d3-array.min”;
case “d3-collection”: return “d3-collection.min”;
case “d3-path”: return “d3-path.min”;
case “d3-shape”: return “d3-shape.min”;
case “d3-sankey”: return “d3-sankey.min”;
}
}));

The runtimeError is almost fix, but I have now a new runtimeError :

viewof edgeColor = RuntimeError: Inputs is undefined
viewof align = RuntimeError: Inputs is undefined
viewof showTotal = RuntimeError: Inputs is undefined
chart = RuntimeError: Inputs is undefined

It seems there is no package for observablehq/Inputs
I tried to create a folder named Inputs in my js directory but it doesn’t work. Is there another issue better than put all the Inputs functions into the notebook before download ?