twibiral / obsidian-execute-code

Obsidian Plugin to execute code in a note.
MIT License
1.06k stars 67 forks source link

Error: spawn go ENOENT #308

Open chenbihao opened 9 months ago

chenbihao commented 9 months ago

I use the go example,it show Error: spawn go ENOENT:

image

image

chenbihao commented 9 months ago

There is also this problem:

When there are multiple code blocks in the callout block, the Run button only exists in the first one:

https://github.com/twibiral/obsidian-execute-code/issues/294#issuecomment-1831630093

kiselev-danil commented 6 months ago

Got the same. Is there any updates?

bl132 commented 3 months ago

1.get your go path : windows(where go); linux(which go). 2.enter path to execute code setting(golang path).

bl132 commented 3 months ago

image

1.获取你的去路:windows(去哪里);linux(去)。 2.输入执行代码设置的路径(Golang路径)。

chenbihao commented 3 months ago

image

1.获取你的去路:windows(去哪里);linux(去)。 2.输入执行代码设置的路径(Golang路径)。

Oh, I finally figured out why it didn't work,

because it needed to be specified to the binary file filepath\go. exe,

and I always thought it was specified to go directory or go\bin directory

chenbihao commented 3 months ago

Got the same. Is there any updates?

needed to be specified to the binary file like filepath\go. exe

kiselev-danil commented 3 months ago

Thanks for answers. Specified path. Didn't worked for me image image

Upd: I'm guessing my problem is caused by the way Obsidian was installed (flatpak)

twibiral commented 3 months ago

Thanks for answers. Specified path. Didn't worked for me image image

Upd: I'm guessing my problem is caused by the way Obsidian was installed (flatpak)

Try adding .exe at the end, maybe it will work. Otherwise its probably flatpak.

/usr/local/go/bin/go -> /usr/local/go/bin/go.exe