terrastruct / d2-vscode

VSCode extension for D2 files.
https://d2lang.com
BSD 3-Clause "New" or "Revised" License
240 stars 11 forks source link

vsc preview error #109

Closed jacealan closed 1 year ago

jacealan commented 1 year ago
image

on vsc(Mac Venture 13.4.1), the preview of *.d2 makes error now. Until a few days ago, it worked well.

but on terminal, d2 is working well.

//flow.d2
x -> y
$ d2 flow.d2
success: successfully compiled flow.d2 to flow.svg in 55.019709ms
alixander commented 1 year ago

@jacealan the error message is right. the environment that you're running d2 in terminal likely just doesn't have the env var set. come to think of it though, it is a fault on our side that we treat that as a fatal error. i've made an issue to address here: https://github.com/terrastruct/d2/issues/1436

BarryNolte commented 1 year ago

I couldn't reproduce this (not for lack of trying), but I totally believe it's happening. @alixander you beat me to this solution.