Error with D2 in environments without browser

Author: bakitoCreated Aug 6, 2025Updated Jun 1, 2026

I was trying D2 integration according to the Documentation and using the same example.

d2
my_table: {
  shape: sql_table
  id: int {constraint: primary_key}
  last_updated: timestamp with time zone
}

When rendering the image on a headless system without browser, the presentation fails on redering the D2 diagram and complains about missing browser dependencies.

I a browser needed to render D2 diagrams or is there an option to disable the requirement?

Error

  Error in slide 3:

'd2' execution failed:
Playwright Host validation warning:
╔══════════════════════════════════════════════════════╗
║ Host system is missing dependencies to run browsers. ║
║ Missing libraries:                                   ║
║     libglib-2.0.so.0                                 ║
║     libgobject-2.0.so.0                              ║
║     libnss3.so                                       ║
║     libnssutil3.so                                   ║
║     libsmime3.so                                     ║
║     libnspr4.so                                      ║

Versions

presenterm: 0.15.0 d2: v0.7.0

References

#657