James-Yu / LaTeX-Workshop

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

I used Chocolatey to install texlive and now I can't compile anything #3375

Closed RheingoldRiver closed 2 years ago

RheingoldRiver commented 2 years ago

Preliminary questions [Required]

Disable all the other extensions except for LaTeX Workshop, restart VS Code, and check that you still see this issue. [Required]

You still see this issue?: Yes

Make sure to visit the wiki FAQ before filling an issue.

You visited the wiki?: Yes

If your issue is with compiling a document (not having to do with finding the root file of a project), check first that you can compile manually.

You can compile a TeX document manually?: Yes (albeit with some warnings but it generates a pdf)

Describe the bug [Required]

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior:

  1. choco install texlive with Chocolatey
  2. Restart computer just in case
  3. Try to compile

Expected behavior

It should compile, but it does not

Logs [Required]

Please paste the whole log messages here, not parts of ones. The log should start with Initializing LaTeX Workshop. It is very important to identify problems.

LaTeX Workshop Output [Required]

[21:21:53] Initializing LaTeX Workshop.
[21:21:53] Extension root: c:\Users\River\.vscode\extensions\james-yu.latex-workshop-8.27.2
[21:21:53] $PATH: C:\Python38\Scripts\;C:\Python38\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\dotnet\;C:\Program Files\Calibre2\;C:\Program Files\nodejs\;C:\MinGW\bin;C:\Program Files (x86)\Git\cmd;C:\tools\php81;C:\ProgramData\ComposerSetup\bin;C:\texlive\2022\bin\win32;C:\lua-language-server\3rd\luamake;S:\System\lua-language-server\3rd\luamake;C:\Users\River\.poetry\bin;C:\Users\River\AppData\Local\Microsoft\WindowsApps;C:\Program Files\JetBrains\PyCharm 2020.3.3\bin;C:\Users\River\AppData\Roaming\npm;C:\Program Files\JetBrains\PhpStorm 2021.1.2\bin;C:\Users\River\.dotnet\tools;C:\Users\River\AppData\Roaming\Composer\vendor\bin
[21:21:53] $SHELL: undefined
[21:21:53] $LANG: undefined
[21:21:53] $LC_ALL: undefined
[21:21:53] process.platform: win32
[21:21:53] process.arch: x64
[21:21:53] vscode.env.appName: Visual Studio Code
[21:21:53] vscode.env.remoteName: undefined
[21:21:53] vscode.env.uiKind: 1
[21:21:53] Workspace for configuration: undefined
[21:21:53] editor.acceptSuggestionOnEnter: "on"
[21:21:53] latex-workshop.bind.enter.key: true
[21:21:53] latex-workshop.docker.enabled: false
[21:21:53] latex-workshop.docker.image.latex: ""
[21:21:53] latex-workshop.hover.preview.mathjax.extensions: []
[21:21:53] latex-workshop.intellisense.package.enabled: true
[21:21:53] latex-workshop.intellisense.update.aggressive.enabled: false
[21:21:53] latex-workshop.intellisense.update.delay: 1000
[21:21:53] latex-workshop.latex.autoBuild.run: "onFileChange"
[21:21:53] latex-workshop.latex.build.forceRecipeUsage: true
[21:21:53] latex-workshop.latex.outDir: "%DIR%"
[21:21:53] latex-workshop.latex.recipes: [
 {
  "name": "latexmk 🔃",
  "tools": [
   "latexmk"
  ]
 },
 {
  "name": "latexmk (latexmkrc)",
  "tools": [
   "latexmk_rconly"
  ]
 },
 {
  "name": "latexmk (lualatex)",
  "tools": [
   "lualatexmk"
  ]
 },
 {
  "name": "latexmk (xelatex)",
  "tools": [
   "xelatexmk"
  ]
 },
 {
  "name": "pdflatex ➞ bibtex ➞ pdflatex × 2",
  "tools": [
   "pdflatex",
   "bibtex",
   "pdflatex",
   "pdflatex"
  ]
 },
 {
  "name": "Compile Rnw files",
  "tools": [
   "rnw2tex",
   "latexmk"
  ]
 },
 {
  "name": "Compile Jnw files",
  "tools": [
   "jnw2tex",
   "latexmk"
  ]
 },
 {
  "name": "tectonic",
  "tools": [
   "tectonic"
  ]
 }
]
[21:21:53] latex-workshop.latex.tools: [
 {
  "name": "latexmk",
  "command": "latexmk",
  "args": [
   "-synctex=1",
   "-interaction=nonstopmode",
   "-file-line-error",
   "-pdf",
   "-outdir=%OUTDIR%",
   "%DOC%"
  ],
  "env": {}
 },
 {
  "name": "lualatexmk",
  "command": "latexmk",
  "args": [
   "-synctex=1",
   "-interaction=nonstopmode",
   "-file-line-error",
   "-lualatex",
   "-outdir=%OUTDIR%",
   "%DOC%"
  ],
  "env": {}
 },
 {
  "name": "xelatexmk",
  "command": "latexmk",
  "args": [
   "-synctex=1",
   "-interaction=nonstopmode",
   "-file-line-error",
   "-xelatex",
   "-outdir=%OUTDIR%",
   "%DOC%"
  ],
  "env": {}
 },
 {
  "name": "latexmk_rconly",
  "command": "latexmk",
  "args": [
   "%DOC%"
  ],
  "env": {}
 },
 {
  "name": "pdflatex",
  "command": "pdflatex",
  "args": [
   "-synctex=1",
   "-interaction=nonstopmode",
   "-file-line-error",
   "%DOC%"
  ],
  "env": {}
 },
 {
  "name": "bibtex",
  "command": "bibtex",
  "args": [
   "%DOCFILE%"
  ],
  "env": {}
 },
 {
  "name": "rnw2tex",
  "command": "Rscript",
  "args": [
   "-e",
   "knitr::opts_knit$set(concordance = TRUE); knitr::knit('%DOCFILE_EXT%')"
  ],
  "env": {}
 },
 {
  "name": "jnw2tex",
  "command": "julia",
  "args": [
   "-e",
   "using Weave; weave(\"%DOC_EXT%\", doctype=\"tex\")"
  ],
  "env": {}
 },
 {
  "name": "jnw2texmintex",
  "command": "julia",
  "args": [
   "-e",
   "using Weave; weave(\"%DOC_EXT%\", doctype=\"texminted\")"
  ],
  "env": {}
 },
 {
  "name": "tectonic",
  "command": "tectonic",
  "args": [
   "--synctex",
   "--keep-logs",
   "%DOC%.tex"
  ],
  "env": {}
 }
]
[21:21:53] latex-workshop.viewer.pdf.internal.keyboardEvent: "auto"
[21:21:53] Creating a new file watcher.
[21:21:53] watcherOptions: {"useFsEvents":false,"usePolling":false,"interval":300,"binaryInterval":1000,"awaitWriteFinish":{"stabilityThreshold":250}}
[21:21:53] Creating PDF file watcher.
[21:21:53] watcherOptions: {"useFsEvents":false,"usePolling":false,"interval":300,"binaryInterval":1000,"awaitWriteFinish":{}}
[21:21:53] Creating Bib file watcher.
[21:21:53] watcherOptions: {"useFsEvents":false,"usePolling":false,"interval":300,"binaryInterval":1000,"awaitWriteFinish":{"stabilityThreshold":250}}
[21:21:53] Set $LATEXWORKSHOP_DOCKER_LATEX: ""
[21:21:53] [Server] Creating LaTeX Workshop http and websocket server.
[21:21:54] LaTeX Workshop initialized.
[21:21:54] Trigger characters for intellisense of LaTeX documents: ["\\",",","{"]
[21:21:54] Bibtex format config: {"tab":"  ","case":"lowercase","left":"{","right":"}","trailingComma":false,"sort":["key"],"alignOnEqual":true,"sortFields":false,"fieldsOrder":[],"firstEntries":["string","xdata"]}
[21:21:54] Current workspace folders: undefined
[21:21:54] Current workspaceRootDir: 
[21:21:54] [Server] Server successfully started: {"address":"127.0.0.1","family":"IPv4","port":59210}
[21:21:54] [Server] valdOrigin is http://127.0.0.1:59210
[21:21:54] Snippet data loaded.
[21:21:55] Current workspace folders: undefined
[21:21:55] Found root file from active editor: s:\Documents\kittens.tex
[21:21:55] Root file changed: from undefined to s:\Documents\kittens.tex
[21:21:55] Start to find all dependencies.
[21:21:55] Root file languageId: latex
[21:21:55] Reset file watcher.
[21:21:55] Parsing a file and its subfiles: s:\Documents\kittens.tex
[21:21:55] Parse fls file.
[21:21:55] Cannot find fls file: s:\Documents\kittens.fls
[21:21:55] Added to file watcher: s:\Documents\kittens.tex
[21:21:55] Checking for duplicate labels: s:\Documents\kittens.tex.
[21:21:57] Manager.fileWatcher.getWatched: {"s:\\Documents\\kittens":["kittens.tex"]}
[21:21:57] Manager.filesWatched: ["s:\\Documents\\kittens.tex"]
[21:21:57] BibWatcher.bibWatcher.getWatched: {}
[21:21:57] BibWatcher.bibsWatched: []
[21:21:57] PdfWatcher.pdfWatcher.getWatched: {}
[21:21:57] PdfWatcher.pdfsWatched: []
[21:21:57] PdfWatcher.watchedPdfVirtualUris: []
[21:21:57] PdfWatcher.ignoredPdfUris: []
[21:22:01] BUILD command invoked.
[21:22:01] The document of the active editor: file:///s:/Documents/kittens.tex
[21:22:01] The languageId of the document: latex
[21:22:01] Current workspace folders: undefined
[21:22:01] Found root file from active editor: s:\Documents\kittens.tex
[21:22:01] Keep using the same root file: s:\Documents\kittens.tex
[21:22:01] Building root file: s:\Documents\kittens.tex
[21:22:01] Build root file s:\Documents\kittens.tex
[21:22:01] outDir: s:/Documents/kittens
[21:22:01] Recipe step 1: latexmk
[21:22:01] Recipe step 1 args: ["-synctex=1","-interaction=nonstopmode","-file-line-error","-pdf","-outdir=s:/kittens","s:/Documents/kittens"]
[21:22:01] Recipe step env: {}
[21:22:01] cwd: s:\Documents\kittens
[21:22:01] LaTeX build process spawned. PID: 17368.
[21:22:01] LaTeX fatal error: spawn latexmk ENOENT, 'latexmk' is not recognized as an internal or external command,
operable program or batch file.
. PID: 17368.
[21:22:01] Does the executable exist? $PATH: undefined
[21:22:01] Does the executable exist? $Path: C:\Python38\Scripts\;C:\Python38\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\dotnet\;C:\Program Files\Calibre2\;C:\Program Files\nodejs\;C:\MinGW\bin;C:\Program Files (x86)\Git\cmd;C:\tools\php81;C:\ProgramData\ComposerSetup\bin;C:\texlive\2022\bin\win32;C:\lua-language-server\3rd\luamake;S:\System\lua-language-server\3rd\luamake;C:\Users\River\.poetry\bin;C:\Users\River\AppData\Local\Microsoft\WindowsApps;C:\Program Files\JetBrains\PyCharm 2020.3.3\bin;C:\Users\River\AppData\Roaming\npm;C:\Program Files\JetBrains\PhpStorm 2021.1.2\bin;C:\Users\River\.dotnet\tools;C:\Users\River\AppData\Roaming\Composer\vendor\bin
[21:22:01] The environment variable $SHELL: undefined

Developer Tools Console [Required]

'latexmk' is not recognized as an internal or external command,
operable program or batch file.

image

Desktop [Required]

Please write exact version numbers. Please don't write latest instead of exact numbers.

Additional questions

Are you using VSCodium?

No

Are you using the Snap or Flatpack versions of VS Code?

I don't think so

Are you using LaTeX Workshop with VS Code Remote?

No

Anything else?

Please note, I have redacted some file names and called everything "kittens" so there may be some inconsistencies in file paths

RheingoldRiver commented 2 years ago

Actually never mind, I installed miktex too (as well as strawberryperl (choco installmiktex, strawberryperl`)) and now it's happy