d2-vscode icon indicating copy to clipboard operation
d2-vscode copied to clipboard

bug: can't find d2 executable

Open jcayzac opened this issue 1 year ago • 6 comments

  • The extension expects d2 to live in the system path, not the user path.
  • It doesn't support GOPATH either.
  • Environment variables are not supported in the D2.execPath setting so passing $GOPATH/bin/d2 there doesn't work either.

I have d2 in my user path, but I cannot use this extension.

Screenshot 2024-08-08 at 14 42 16 Screenshot 2024-08-08 at 14 42 40

jcayzac avatar Aug 08 '24 05:08 jcayzac

same here.

suchwerk avatar Dec 09 '24 07:12 suchwerk

Does it work if you set the d2 path in the settings to (as in the example above): "/Users/julien.cayzac/.go/bin/d2". The logic is pretty simple, it takes that string from the settings and tries to execute it.

BarryNolte avatar Dec 09 '24 23:12 BarryNolte

Yes this is working. I wounder why d2 is not found on the system path.

suchwerk avatar Dec 10 '24 12:12 suchwerk

I think we should use D2 WEB API calls by default instead of having to install d2 locally!

[17:17:01] - ************************************************************
[17:17:01] - D2 executable not found.
[17:17:01] - Make sure the D2 executable is installed and on your system PATH.
[17:17:01] - https://d2lang.com/tour/install
[17:17:01] - ************************************************************

Sayi avatar Dec 13 '24 09:12 Sayi

My impression is this does not work because (sigh) the VSCode Extension search for D2 binary in the working directory, not in the actual path or system PATH.

JLT032 avatar Dec 14 '24 14:12 JLT032

i plan to release a d2 wasm/js package which will replace the need for an installed binary

alixander avatar Dec 29 '24 06:12 alixander