Latex-workshop: LaTeX build process spawned. PID: undefined.

Created on 26 Apr 2019  Â·  13Comments  Â·  Source: James-Yu/LaTeX-Workshop

It was still able to compile the night before. But when I reopened VS code the next day it couldn't compile anymore.

The error: Recipe terminated with fatal error: spawn latexmk ENOENT
Logs
[04:04:32] LaTeX build process spawned. PID: undefined.
[04:04:32] LaTeX fatal error: spawn latexmk ENOENT, . PID: undefined.
[04:04:32] Does the executable exist? PATH: /Users/myusername/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin≈
[04:04:37] ACTIONS command invoked.
[04:04:38] ACTIONS command invoked.
[04:04:38] ACTIONS command invoked.
[04:04:40] LOG command invoked.

  • OS: MacOs mojave
  • VS Code version: 1.33.1
external

All 13 comments

It look like latexmk is not in your PATH. Probably not related to the extension.

Do you have any idea how to include it?

It should be in /Library/TeX/texbin, which is in your path according to
[04:04:32] Does the executable exist? PATH: /Users/myusername/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin≈
If latexmk is not in /Library/TeX/texbin, then it is related to your TeX installation.

If your PATH includes the character ≈, that seems to be the cause.

Is there anyway I can fix this?

Run echo $PATH from the Terminal.
Your PATH is probably partly defined in $HOME/.bashrc or $HOME/.bash_profile.

I'm having this same problem. /Library/TeX/texbin is in my path when I echo it from the terminal but when I try to build a project I get

[11:09:56] LaTeX fatal error: spawn latexmk ENOENT, . PID: undefined.
[11:09:56] Does the executable exist? PATH: /usr/bin:/bin:/usr/sbin:/sbin

which seems to indicate that my PATH is not being grabbed correctly by the extension. I use fish shell. With the same configuration I used to be able to use the extension a few weeks ago.

If you need help, please open a new issue filling in the required information.

Many issues have already filled up for this question, which is related to your system configuration and not to the extension. See these issues.

On Mac, I found the source of the bug being that the system doesn't have the required package.

https://mg.readthedocs.io/latexmk.html#installation

You need to symlink your path to tlmgr if the command can't be found:

  • vi .bashrc

  • export PATH="/path/to/TeX

  • source ~/.bashrc

mine looks like this:

export PATH="/Library/TeX/texbin/:$PATH"

After you've done that, install the package and it works

How to solve the question?

It was still able to compile the night before. But when I reopened VS code the next day it couldn't compile anymore.

The error: Recipe terminated with fatal error: spawn latexmk ENOENT
Logs
[04:04:32] LaTeX build process spawned. PID: undefined.
[04:04:32] LaTeX fatal error: spawn latexmk ENOENT, . PID: undefined.
[04:04:32] Does the executable exist? PATH: /Users/_myusername_/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin≈
[04:04:37] ACTIONS command invoked.
[04:04:38] ACTIONS command invoked.
[04:04:38] ACTIONS command invoked.
[04:04:40] LOG command invoked.

  • OS: MacOs mojave
  • VS Code version: 1.33.1

Did someone fix the problem?

@Mrfangfang Have you followed the installation instructions? https://github.com/James-Yu/LaTeX-Workshop/wiki/Install

Was this page helpful?
0 / 5 - 0 ratings