Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Code LaTeX Workshop: ENOENT Error with latexindent after macOS Sonoma update

Issue with LaTeX Workshop in VS Code: Error with latexindent on macOS

I recently updated my Mac to MacOS Sonoma Version 14.6.1. I'm now encountering an issue when trying to run a .tex file in Visual Studio Code using the LaTeX Workshop extension. I receive the following error:

[22:03:59.630][Format][TeX] Error when removing temporary file Error: ENOENT: no such file or directory, unlink '/Users/.../indent.log'

VSCode still creates the PDF, however, I get an error message and there is about a 1 sec delay, which is an extreme nuisance when I need to update a document frequently.

What I've Tried So Far:

  1. Verified the path to latexindent:

    • In the terminal, I ran which latexindent and confirmed that the path to latexindent is /Library/TeX/texbin/latexindent.
    • Updated the LaTeX Workshop settings in VS Code by adding the correct path to latexindent in the settings.json file: "latex-workshop.latexindent.path": "/Library/TeX/texbin/latexindent"
  2. Reinstalled TeX Live:

    • I reinstalled the TeX Live distribution by downloading MacTeX and running the installer.
    • Verified that latexindent is working by running it directly in the terminal without issues.
  3. Other settings in settings.json:

    • I have the following settings related to LaTeX Workshop:

      "latex-workshop.view.pdf.viewer": "tab", "latex-workshop.latexindent.path": "/Library/TeX/texbin/latexindent", "latex-workshop.intellisense.bibtexJSON.replace": {}, "latex-workshop.message.badbox.show": false

Despite these steps, I still get the same ENOENT error when trying to format or save .tex files in VS Code. I'm unsure if this is related to LaTeX Workshop, the latexindent path, or something else.

Does anyone have suggestions on what I can try next to resolve this error? Any help is appreciated!

like image 862
tupben Avatar asked Aug 31 '25 20:08

tupben


1 Answers

Environment:

  • macOS: v14.6.1
  • VS Code: v1.95.3
  • Latex Workshop: v10.5.6

I fixed this issue by installing the File::HomeDir perl module (which is used to locate the home directory on different operating systems).

sudo cpan File::HomeDir

like image 62
MattEvansDev Avatar answered Sep 04 '25 00:09

MattEvansDev