VScode Recipe ternimated with fatal error: spwan latexmk ENOENT

created at 09-01-2021 views: 77

Background of the problem

On macOS, in VScode, Latex reports an error during build and displays as follows:

Recipe ternimated with fatal error: spwan pdflatex/latexmk ENOENT

reason for this error

the local tex is not written into the PATH, or the texlive path in the PATH is wrong (mine was updating the texlive and the installation directory name changed).

solution

Find the installation path of texlive, such as my path is /usr/local/texlive/2021/bin/universal-darwin
Write export PATH=dir:$PATH in zshrc or bashrc.

created at:09-01-2021
edited at: 09-01-2021: