observablehq / plot

A concise API for exploratory data visualization implementing a layered grammar of graphics
https://observablehq.com/plot/
ISC License
4.25k stars 173 forks source link

schemeObservable10 Bug after Release #2022

Closed Cattiva closed 5 months ago

Cattiva commented 5 months ago

Hi all,

since today, I'm experiencing a bug with all my plots that I'm using in a quarto document with ojs cells.

The Error message reads as: OJS Runtime Error: The requested module '/v135/d3@7.9.0/esnext/d3.mjs' does not provide an export named 'schemeObservable10'

I'm importing the latest release of plot for the tooltip capabilities as

Plot = import("https://esm.sh/@observablehq/plot")

If I comment this line out or roll back to the previous version, it works as expected.

Seeing that new releases of plot (v0.6.14) and d3 (v7.9.0) just came out, both containing schemeObservable10 in their release notes, I'm guessing something is wrong with the newest version.

Maybe you might have a look into this.

Best regards Alex

mbostock commented 5 months ago

This seems to be a bug in esm.sh: it is loading d3-scale-chromatic@3.0.0, but the latest version of d3-scale-chromatic is 3.1.0. I suggest that you use jsDelivr instead, which does not have this bug.

Plot = import("https://cdn.jsdelivr.net/npm/@observablehq/plot/+esm")
Cattiva commented 5 months ago

Many thanks for the very quick update :) Can confirm, it works now.

mbostock commented 5 months ago

I filed a bug with esm.sh here https://github.com/esm-dev/esm.sh/issues/810.

maelp commented 2 months ago

I have the same bug when importing the lib through uwdata/vgplot, it tells me this

error during build:
[vite-plugin-pwa:build] ../node_modules/.pnpm/@observablehq+plot@0.6.15/node_modules/@observablehq/plot/src/scales/schemes.js (51:2): "schemeObservable10" is not exported by "../node_modules/.pnpm/d3@7.9.0/node_modules/d3/src/index.js", imported by "../node_modules/.pnpm/@observablehq+plot@0.6.15/node_modules/@observablehq/plot/src/scales/schemes.js".
mbostock commented 2 months ago

You need to upgrade your transitive dependencies if you run into this issue. When the next version of D3 is released it will automatically upgrade transitive dependencies. https://github.com/d3/d3/pull/3886