James-Yu / LaTeX-Workshop

Boost LaTeX typesetting efficiency with preview, compile, autocomplete, colorize, and more.
MIT License
10.62k stars 529 forks source link

latexmk: run not found in version 9.21.1 #4297

Closed dulimarta closed 3 months ago

dulimarta commented 3 months ago

Please fill the following fields with a star (*) and provide as much related information as possible.

Pre-checks*

Please change the following [ ] to [x] for confirmation.

  • [x] The issue has not been reported in this repository.
  • [ ] The issue remains after disabling all other extensions and restarting Visual Studio Code.
  • [ ] The FAQ cannot address the issue.
  • [ ] The issue is not related to compiling a document, or the document can be successfully compiled in the OS terminal but not in Visual Studio Code with this extension.

Environment*

Please write exact version numbers instead of descriptors such as latest.

  • Operating System: Mac Sonoma 14.5
  • Visual Studio Code Version: 1.90.2
  • LaTeX Workshop Version: 9.21.1
  • TeX Distribution Version: Docker container ghcr.io/xu-cheng/texlive-full

The Issue*

Please briefly describe the issue you come across.

I just upgraded my LaTeX-Workshop this morning and all other setttngs remain the same as yesterday. But now compiling the document gives me the following error:

/Users/dulimarh/.vscode/extensions/james-yu.latex-workshop-9.21.1/scripts/latexmk: line 2: run: command not found- 

Reproduction Steps

Please list out the steps to reproduce your bug. Include relevant environmental variables or any other configuration.

  1. Create a simple hello world .tex
   \documentclass{article}
   \begin{document}
   Hello World
   \end{document}
  1. Select Build LaTeX Project => Recipe: Latexmk

Expected Behavior

What were you expecting to see? Include any relevant examples or documentation links.

The document should compile without any errors.

Logs

LaTeX Workshop Output*

Please paste the whole log messages below, not parts of ones. The log should start with New log placeholder %WS1% registered.


[08:29:43.703][Commander] RECIPES command invoked.
[08:29:43.703][Commander] BUILD command invoked.
[08:29:43.703][Build] The document of the active editor: file://%WS1%/deploy.tex
[08:29:43.704][Build] The languageId of the document: latex
[08:29:43.704][Root] Current workspace folders: ["file://%WS1%"]
[08:29:43.705][Root] Found root file from active editor: %WS1%/deploy.tex
[08:29:43.705][Root] Keep using the same root file: %WS1%/deploy.tex
[08:29:43.705][Event] ROOT_FILE_SEARCHED
[08:29:43.705][Event] STRUCTURE_UPDATED
[08:29:43.706][Build] Building root file: %WS1%/deploy.tex
[08:29:43.706][Build][Recipe] Build root file %WS1%/deploy.tex
[08:29:43.707][Build][Recipe] Preparing to run recipe: latexmk.
[08:29:43.708][Build][Recipe] Prepared 1 tools.
[08:29:43.708][Build][Recipe] Use Docker to invoke the command.
[08:29:43.708][Build][Recipe] outDir: %WS1%/build .
[08:29:43.709][Build] Recipe step 1 The command is /Users/dulimarh/.vscode/extensions/james-yu.latex-workshop-9.21.1/scripts/latexmk:["--shell-escape","-synctex=1","-interaction=nonstopmode","-file-line-error","-pdf","-outdir=build","deploy"].
[08:29:43.709][Build] env: {}
[08:29:43.709][Build] root: %WS1%/deploy.tex
[08:29:43.709][Build] cwd: %WS1%
[08:29:43.710][Build] LaTeX build process spawned with PID 17849.
[08:29:43.729][Build] Recipe returns with error code 127/null on PID 17849.
[08:29:43.729][Build] Does the executable exist? $PATH: /Users/dulimarh/Desktop/google-cloud-sdk/bin:/Users/dulimarh/.gem/bin:/Users/dulimarh/.nvm/versions/node/v20.11.0/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Library/TeX/texbin:/Users/dulimarh/.cargo/bin:/usr/local/bin, $Path: undefined, $SHELL: /bin/zsh
[08:29:43.729][Build] /Users/dulimarh/.vscode/extensions/james-yu.latex-workshop-9.21.1/scripts/latexmk: line 2: run: command not found

[08:29:43.729][Build] Cleaning auxiliary files and retrying build after toolchain error. [08:29:43.730][Cleaner] Clean temporary files command The command is latexmk:["-outdir=build","-c","%WS1%/deploy.tex"]. [08:29:43.741][Build] Recipe step 1 The command is /Users/dulimarh/.vscode/extensions/james-yu.latex-workshop-9.21.1/scripts/latexmk:["--shell-escape","-synctex=1","-interaction=nonstopmode","-file-line-error","-pdf","-outdir=build","deploy"]. [08:29:43.741][Build] env: {} [08:29:43.742][Build] root: %WS1%/deploy.tex [08:29:43.742][Build] cwd: %WS1% [08:29:43.744][Build] LaTeX build process spawned with PID 17868. [08:29:43.766][Build] Recipe returns with error code 127/null on PID 17868. [08:29:43.766][Build] Does the executable exist? $PATH: /Users/dulimarh/Desktop/google-cloud-sdk/bin:/Users/dulimarh/.gem/bin:/Users/dulimarh/.nvm/versions/node/v20.11.0/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Library/TeX/texbin:/Users/dulimarh/.cargo/bin:/usr/local/bin, $Path: undefined, $SHELL: /bin/zsh [08:29:43.766][Build] /Users/dulimarh/.vscode/extensions/james-yu.latex-workshop-9.21.1/scripts/latexmk: line 2: run: command not found

[08:29:43.942][Event] AUTO_CLEANED



### Developer Tools Console
> _Please paste the whole log messages below, not parts of ones. This console logs can sometimes be very important in many cases. To access the log, click `Help` -> `Toggle Developer Tools` -> `Console`._

(No console output generated)

## Anything Else?
> _Add any other context about the problem below._

Reverting back to version 9.20.1 does not show the issue.
James-Yu commented 3 months ago

Please post full log.

James-Yu commented 3 months ago

You may want to check your latex-workshop.docker.path config and log line says [Build][Recipe] Set $LATEXWORKSHOP_DOCKER_PATH: "docker"

dulimarta commented 3 months ago

@James-Yu Thank you so much for your prompt response. Your reply fixes my issue.

BTW, I could not find any mention of the configuration line latex-workshop.docker.path in the Wiki, neither under the VSCode setting screen. I learned about this configuration line from your response above.