embedding viewof error - radio could not be resolved

The underlying issue here is that the “input” cell appears twice in https://api.observablehq.com/d/09fe7ea0f0ac07fd.js

There are a few solutions described in this recent thread. The most future-proof one is to switch to using the v3 module format like this:

<script type="module">
  import {
    Runtime,
    Inspector
  } from "https://cdn.jsdelivr.net/npm/@observablehq/runtime@4/dist/runtime.js";

  // Your notebook, compiled as an ES module.
  import define from "https://api.observablehq.com/d/09fe7ea0f0ac07fd.js?v=3";

  const renders = {
    "viewof p": "#viewof-p"
  };

  for (let i in renders)
    renders[i] = document.querySelector(renders[i]);

  const runtime = new Runtime();
  const main = runtime.module(define, name => {
    if (renders[name]) {
      return new Inspector(renders[name]);
    }
  });
  </script>
2 Likes