Now that I tried running the code, I’m seeing a “modules not iterable” error when I test this out with my notebook. The example notebook from the post works fine.
load.js:20 Uncaught TypeError: modules is not iterable
at Function.load (load.js:20)
load @ load.js:20
(anonymous) @ main.js:22
(anonymous) @ main.js:31
Using the Chrome debugger I see that
notebook is a function, rather than an object:
One difference is that my notebooks have circular dependencies — I have a “library” notebook that imports functions from other notebooks for re-export, and in a few cases the library notebook imports function
A from some notebook which imports function
B from the library notebook. Rollup gives me warnings about circular dependencies though I don’t know if it’s a problem, since everything works perfectly on observablehq.com.
Edit: It probably can’t be that, since there are circular dependencies within e. g. the inspector, not just my notebooks:
(!) Circular dependency: node_modules/@observablehq/inspector/src/collapsed.js -> node_modules/@observablehq/inspector/src/expanded.js -> node_modules/@observablehq/inspector/src/collapsed.js