I am in the midst of moving from macOS to Windows 10, and in doing so have needed to move a number of LaTeX project workspaces from VS Code operating on macOS to VS Code operating on Windows 10, and it's come with a fair amount of resistance. In particular, each time I try to build the desired PDF, I am greeted with the following LaTeX workshop log.
[22:59:56] BUILD command invoked.
[22:59:56] The document of the active editor: file:///{PLACEHOLDER_DIRECTORY}
[22:59:56] The languageId of the document: latex
[22:59:56] Current workspace folders: undefined
[22:59:56] Current workspaceRootDir:
[22:59:56] Found root file from active editor: {PLACEHOLDER_DIRECTORY}
[22:59:56] Keep using the same root file: {PLACEHOLDER_DIRECTORY}
[22:59:56] Building root file: {PLACEHOLDER_DIRECTORY}
[22:59:56] Build root file d:{PLACEHOLDER_DIRECTORY}
[22:59:56] outDir: {PLACEHOLDER_DIRECTORY}
[22:59:56] Recipe step 1: latexmk, -synctex=1,-interaction=nonstopmode,-file-line-error,-pdf,-outdir={PLACEHOLDER_DIRECTORY},{PLACEHOLDER_DIRECTORY}
[22:59:56] Recipe step env: {}
[22:59:56] cwd: {PLACEHOLDER_DIRECTORY}
[22:59:56] LaTeX build process spawned. PID: 12076.
[22:59:56] Recipe returns with error: 1/null. PID: 12076. message: 'docker' is not recognized as an internal or external command,
operable program or batch file.
.
[22:59:56] The environment variable $PATH: undefined
[22:59:56] The environment variable $SHELL: undefined
[22:59:56] Cleaning auxiliary files and retrying build after toolchain error.
[22:59:56] Clean glob matched files: {"globs":["*.aux","*.bbl","*.blg","*.idx","*.ind","*.lof","*.lot","*.out","*.toc","*.acn","*.acr","*.alg","*.glg","*.glo","*.gls","*.fls","*.log","*.fdb_latexmk","*.snm","*.synctex(busy)","*.synctex.gz(busy)","*.nav"],"outdir":{PLACEHOLDER_DIRECTORY}}
[22:59:56] Recipe step 1: latexmk, -synctex=1,-interaction=nonstopmode,-file-line-error,-pdf,-outdir={PLACEHOLDER_DIRECTORY},{PLACEHOLDER_DIRECTORY}
[22:59:56] Recipe step env: {}
[22:59:56] cwd: {PLACEHOLDER_DIRECTORY}
[22:59:56] LaTeX build process spawned. PID: 9968.
[22:59:56] Recipe returns with error: 1/null. PID: 9968. message: 'docker' is not recognized as an internal or external command,
operable program or batch file.
.
[22:59:56] The environment variable $PATH: undefined
[22:59:56] The environment variable $SHELL: undefined
Now, in the past I've (perhaps luckily) managed to fix issues the likes of 'docker' is not recognized as an internal or external command, operable program, or batch file' by messing around with the directories listed under my device's paths, although this problem is one I've not been able to resolve thus far, and I'm at the end of my proverbial intellectual rope.
In the event that it helps solve the problem, I've attached also the LaTeX workshop logs as they are generated when opening VS Code.
[22:53:53] Initializing LaTeX Workshop.
[22:53:53] Extension root: {PLACEHOLDER_DIRECTORY}
[22:53:53] $PATH: {PLACEHOLDER_DIRECTORY};{PLACEHOLDER_DIRECTORY};{PLACEHOLDER_DIRECTORY};{PLACEHOLDER_DIRECTORY};{PLACEHOLDER_DIRECTORY};{PLACEHOLDER_DIRECTORY};{PLACEHOLDER_DIRECTORY};{PLACEHOLDER_DIRECTORY};{PLACEHOLDER_DIRECTORY};{PLACEHOLDER_DIRECTORY};{PLACEHOLDER_DIRECTORY};{PLACEHOLDER_DIRECTORY};{PLACEHOLDER_DIRECTORY};{PLACEHOLDER_DIRECTORY};{PLACEHOLDER_DIRECTORY};{PLACEHOLDER_DIRECTORY};.
[22:53:53] $SHELL: undefined
[22:53:53] vscode.env.appName: Visual Studio Code
[22:53:53] vscode.env.remoteName: undefined
[22:53:53] vscode.env.uiKind: 1
[22:53:53] latex-workshop.bind.enter.key: true
[22:53:53] latex-workshop.docker.enabled: false
[22:53:53] latex-workshop.docker.image.latex: ""
[22:53:53] latex-workshop.intellisense.package.enabled: true
[22:53:53] latex-workshop.intellisense.update.aggressive.enabled: false
[22:53:53] latex-workshop.intellisense.update.delay: 1000
[22:53:53] latex-workshop.latex.autoBuild.run: "onFileChange"
[22:53:53] latex-workshop.latex.outDir: "%DIR%"
[22:53:53] latex-workshop.latex.recipes: [
{
"name": "latexmk ",
"tools": [
"latexmk"
]
},
{
"name": "latexmk (latexmkrc)",
"tools": [
"latexmk_rconly"
]
},
{
"name": "latexmk (lualatex)",
"tools": [
"lualatexmk"
]
},
{
"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"
]
}
]
[22:53: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": "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": {}
}
]
Perhaps most interestingly is that the fourth line of the above block of code reads
[22:53:53] $SHELL: undefined
Which is something I've noticed isn't the case on, for example, my old macOS device, where the $SHELL path wasn't undefined.
One final thing that's worth noting is that I'm not launching VS Code here using the executable itself. Instead, I've set up a batch file that opens VS Code up from a particular Miniconda environment (since I am also using VS Code on my new Windows 10 device to the end of programming in Python). I am not entirely sure whether or not this makes a difference, although I have tried opening VS Code using the executable itself, and this has not seemed to resolve the issue. I've also tried disabling all additional extensions and replicating the behaviour that caused the issue, and said behaviour did indeed incur the same issue once again.
This is all I've managed to do thus far.
Any help on this issue is greatly appreciated!