I'm trying out the Deno Jupyter kernel integration. My specific goal is to use D3 to plot some data in a Jupyter notebook.
My setup is:
- the Deno docker image from Docker Hub : denoland/deno:ubuntu-1.41.0.
- I installed Jupyter and ran the Deno kernel installation with: deno jupyter --unstable --install. I tried out a couple of examples specifically with D3 data plotting and both fail at the same point: when importing from skia_canvas. The examples are here:
- https://blog.logrocket.com/deno-jupyter-notebook-data-dashboard/
- https://blog.jupyter.org/bringing-modern-javascript-to-the-jupyter-notebook-fc998095081e
The code fails at :
import {
createCanvas,
Image,
Path2D,
} from "https://deno.land/x/skia_canvas/mod.ts";
With:
Stack trace:
TypeError: Deno.dlopen is not a function
at dlopen (https://deno.land/x/[email protected]/mod.ts:145:15)
at eventLoopTick (ext:core/01_core.js:153:7)
at async https://deno.land/x/[email protected]/src/ffi.ts:966:10
On the skia_canvas repo (https://github.com/DjDeveloperr/skia_canvas) I see they note that their package relies on unstable FFI Api and requires specific run command parameters.
deno run --allow-ffi --allow-env --unstable <file>
# or just
deno run -A --unstable <file>
However, I am running this in Jupyter so this is not an option I am aware off.
Does anyone have an idea how I can workaround this issue ?