code-server: Can't load LaTeX Workshop extension
I am trying to run the LaTeX Workshop extension (james-yu.latex-workshop). I have tried with extension versions 8.7.2, 8.10.0 and 8.11.0, all with the same results. I get the error command 'latex-workshop.view' not found when I click the “View LaTeX PDF File” icon, and nothing else happens.
Digging deeper, enabling source map support, the Output termninal “Log (Remote Extension Host)” shows the following error message.
[2020-06-24 00:09:19.066] [exthost] [error] Activating extension James-Yu.latex-workshop failed due to an error:
[2020-06-24 00:09:19.067] [exthost] [error] Error: Cannot find module '/home/jovyan/.local/share/code-server/extensions/james-yu.latex-workshop-8.10.0/out/src/main.js'
The out/ subdirectory does not exist.
My interpretation is that out/ is supposed to contain build targets which are somehow not being built. Indeed, the extension’s GitHub contains /src/main.ts but no /out/. I don’t know any TypeScript, so does this make sense? Any idea how to fix it?
- Web Browser: Firefox
- Local OS: Ubuntu 20.04
- Remote OS: locally-running jupyter/tensorflow-notebook Docker container
- Remote Architecture: x86_64
code-server --version: 3.4.1 48f7c2724827e526eeaa6c2c151c520f48a61259
Note: I am able to manually install the .vsix.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 4
- Comments: 16 (2 by maintainers)
For those facing the same issue
run
on your remote host for a quick fix
(see gist)
edit: this fix builds upon @nao20010128nao solution:
edit2: you might need to change some stuff in the script if you’re not on Debian or having a non-standart install
edit3: you need to reload your vscode instance e.g. just reopen the same folder
I had the same problem when trying to build LaTeX-Workshop myself for the first time (in local VS Code):
While it installed successfully, it did not load. What I was missing, after the
git checkout, was to openLaTeX-Workshopin VS Code, F1, “>Run Build Task”. Did that, repackaged and installed, and got it working.Hope this helps anyone.
Just to report: LaTeX Workshop v8.23.0 works fine under code-server 4.0.1.
Both code-server and texlive are installed over homebrew on MacOS 12.1.
Note that the pdf previewer is running on a separate port than code-server, so in order to make it work remotely (e.g., from docker or ssh), one has to forward this port as well. See https://github.com/James-Yu/LaTeX-Workshop/issues/2206. However, it is possible to use another previewer: just search for “pdf” in extensions. “Papyrus PDF Preview” and “Office Viewer” are working for me fine, except that some icons are not displayed. In this case, of course, forward and inverse search will not work. I wish the built-in previewer had worked in the same way.
I can confirm this issue still exists on code-server 3.12.
I installed via vsix in coder-server 3.9.0 The pdf view doesn’t work like explained in other issues. Building does Work
And highlighting doesn’t work anyone a clue how to fix it or why it might not hightlight anything?
edit: sorry got it working Latex workshop doesn’t support visual studio Dark or light color theme. Dark + works fine 😃