Yes, unfortunately mermaid requires not only node but also a browser instance (!!). I don't like it at all but I don't think there's any alternatives. If you or anyone knows a way of avoiding installing a javascript package to do this please create an issue in the repo!