Skip to content
This repository was archived by the owner on Jul 24, 2021. It is now read-only.

Error 'Uncaught Error: spawn pandoc ENOENT' #14

Closed
twsh opened this issue Dec 29, 2014 · 7 comments
Closed

Error 'Uncaught Error: spawn pandoc ENOENT' #14

twsh opened this issue Dec 29, 2014 · 7 comments

Comments

@twsh
Copy link

twsh commented Dec 29, 2014

Whenever I try to preview I get the error 'Uncaught Error: spawn pandoc ENOENT'. I'm using version 0.1.2, Atom version 0.165.0 on OS X.

Here is the stack trace:

Error: spawn pandoc ENOENT
  at exports._errnoException (util.js:742:11)
  at Process.ChildProcess._handle.onexit (child_process.js:1051:32)
  at child_process.js:1142:20
  at process._tickCallback (node.js:378:11)
@jagregory
Copy link
Owner

Have you got your PATH set up correctly? See: Problems with PATH

@twsh
Copy link
Author

twsh commented Dec 30, 2014

I made the change you described; it didn't avoid the problem. (Pandoc is properly installed and in my path.)

One thing that does suggest that it might be a path issue of some sort: if I do $ atom foo.md it works fine.

@twsh
Copy link
Author

twsh commented Dec 30, 2014

I don't know if this is relevant: I have the same problem on Ubuntu 14.04. So it's not just an OS X quirk.

@Skyfold
Copy link

Skyfold commented Jan 18, 2015

I had the same problem, with the same error message as above. To fix it you have to:

 vi `which atom`

Add "env" before this line:

open -a "$ATOM_PATH/$ATOM_APP_NAME" -n --args --executed-from="$(pwd)" --pid=$$ --path-environment="$PATH" "$@"

Like so:

env open -a "$ATOM_PATH/$ATOM_APP_NAME" -n --args --executed-from="$(pwd)" --pid=$$ --path-environment="$PATH" "$@"

Then call atom from the command line. I have yet to make it work by calling atom from spotlight

I also tried editing /etc/launchd.conf, adding in setenv PATH /Applications/Atom.app to the file and reloading everything with grep -E "^setenv" /etc/launchd.conf | xargs -t -L 1 launchctl, but that only gave me this error instead:

'pandoc' could not be spawned. Is it installed and on your path? If so please open an issue on the package spawning the process.

@jeffmcneill
Copy link

I've got the same issue. Will work when I run atom from command line, but not launch as an icon/explorer. I've added "env" and that didn't fix it. Any updates of things to try out?

@jagregory
Copy link
Owner

I'm afraid not. This is a more general issue with Atom (and Sublime) and Macs, unfortunately.

@maxheld83
Copy link

I have the same problem, on OS X – even though PATH is set up as indicated:

open -a "$ATOM_PATH/$ATOM_APP_NAME" -n --args --executed-from="$(pwd)" --pid=$$ --path-environment="$PATH" "$@"

Starting Atom from CLI works just fine, oddly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants