dfinke / vscode-pandoc

Visual Studio Code extension lets you render markdown to pdf, word doc or html with pandoc
129 stars 35 forks source link

pandoc: command not found #21

Open MrPoetry opened 7 years ago

MrPoetry commented 7 years ago

I installed your extension via the Extension Search in VS Code's sidebar. Macbook Pro, 10.11.6. VS Code 1.11.2.

"Pandoc Render" is throwing the following errors:

exec error: Error: Command failed: pandoc "/Volumes/ImTheUser/TEMP/CURRENT NOTES.md" -o "/Volumes/ImTheUser/TEMP/CURRENT NOTES.pdf"

stderr: /bin/sh: pandoc: command not found

In a terminal, I get:

ImTheUser$ pandoc --version pandoc 1.14.0.1

And if I run in VS Code's integrated terminal the same command shown in the above exec error:

ImTheUser$ pandoc "/Volumes/ImTheUser/TEMP/CURRENT NOTES.md" -o "/Volumes/ImTheUser/TEMP/CURRENT NOTES.pdf"

...a .PDF is rendered perfectly.

What should I do? I'm guessing I'm missing something basic.

nfoti commented 7 years ago

I was having this problem as well when using a particular wireless network. When I changed from that network to a different one this plugin worked again.

I have no idea why the wireless network would matter.

flipphillips commented 7 years ago

Do this

$ which pandoc

and see 'where' the path points. It appears it can't find it in the $PATH

I can't see a place in preferences to set the path, so I manually twerked the module to look in the right place.

sunmorgus commented 7 years ago

I had a similar issue recently... not sure why this worked, but reloading the vscode window fixed it. I'm wondering if I hadn't started up another terminal at some point that change the path maybe?

aragalie commented 6 years ago

Had the same issue, and can confirm that the solution is to restart VSCode. It then works as usual for some reason..

RedX2501 commented 6 years ago

It would be much nicer if this extension allowed to configure the location of pandoc.exe instead of having to have it in the PATH variable.

furicle commented 6 years ago

I have a similar but not quite the same issue.

which pandoc in the VSCode terminal works (c:\program files\pandoc\pandoc) as well as in cmd or powershell etc.

But I'm still getting can't find when I try and use the extension?!?

InfiniteFalltrough commented 1 year ago

same issue $ which pandoc just causing "pandoc not found"