ajshort / vscode-latex-preview

Compilation and embedded preview of LaTeX documents for Visual Studio Code
MIT License
33 stars 11 forks source link

Can't open preview #17

Open Bebotron opened 7 years ago

Bebotron commented 7 years ago

When I try to preview a file I get the error: Unable to open 'Preview "filename.tex"': Cannot read property 'map' of undefined.

Windows 10 v.1.15.1

ajshort commented 7 years ago

Are you using latexmk? If so, do you have Perl installed?

Bebotron commented 7 years ago

No Iā€™m using pdflatex

From: Andrew Short Sent: Sunday, August 20, 2017 6:27 AM To: ajshort/vscode-latex-preview Cc: Bebotron; Author Subject: Re: [ajshort/vscode-latex-preview] Can't open preview (#17)

Are you using latexmk? If so, do you have Perl installed? ā€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

btracey commented 7 years ago

I have the same issue. OSX 10.12.6 . Latex preview 0.5.1, latex workshop 3.5.3. I haven't changed any of the default settings. The same issue happens if I switch "latex-preview.command" to latexmk (and I do have perl installed).

btracey commented 7 years ago

I realized that clicking the "view PDF file in new tab" does work (and updates properly on save), it's just the "Open Preview" button that gives the error.

LLJJDD commented 7 years ago

I've got the same problem. Unable to open 'Preview "filename.tex"': Cannot read property 'map' of undefined. Using the default settings, with perl, Tex Live, Latex Workshop installed. Win10.

joshuagruenstein commented 7 years ago

Same problem on Mac OS 10.13.1.

LucasAmos commented 6 years ago

same problem macos 10.13.2, visual studio code, latex workshop and latex preview

Jue-Xu commented 6 years ago

Same problems on macos 10.13.2

xindiguo commented 6 years ago

Same problem on mac os 10.12.6

Nexolight commented 6 years ago

Windows 10, Pearl, TeX Live and LaTeX workshop installed - Same Problem. Also the "View LaTeX PDF File in new tab" Does not work for me. Apart from the "Cannot read property 'map' of undefined" error when clicking "Open Preview"

Edit: The same happens for both on Void Linux with TeX Live.

gurkang commented 6 years ago

Same problem on mac os 10.11.6

johndebord commented 6 years ago

Any update?

ajshort commented 6 years ago

Unfortunately I'm unable to replicate this issue. If someone has a basic example project they can zip up and attach to the issue it would be appreciated.

Or if someone can run the extension under the vscode extension debugger and capture a stack trace that would be even better. All you need to do is clone the extension repository, open the folder in vscode and run the project using F5.

C1710 commented 6 years ago

@ajshort I just tried running it using the extension debugger, but it returns another error (in German):

C:\Program Files\Microsoft VS Code\Code.exe --debugBrkPluginHost=47755 --debugId=1da735a0-a508-4f76-a037-d4efca185c26 --extensionDevelopmentPath=C:\Users\const\git\vscode-latex-preview 
Fehler beim Aktivieren der Erweiterung "ajshort.latex-preview": Cannot find module 'C:\Users\const\git\vscode-latex-preview\out\src\extension'.
extensionHostProcess.js:673
Activating extension `ajshort.latex-preview` failed:  Cannot find module 'C:\Users\const\git\vscode-latex-preview\out\src\extension'
extensionHostProcess.js:418
Here is the error stack:  Error: Cannot find module 'C:\Users\const\git\vscode-latex-preview\out\src\extension'
extensionHostProcess.js:418
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Function.J.Z.t.getExtensionPathIndex.then.o._load (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:653:398)

BUT somehow it works when using it while I have the folder opened when I try to open the preview.
Since I don't know anything about VS code - I actually just looked for a Hi-DPI alternative to running gummi inside WSL using an X-server šŸ˜… - I don't know how to provide more information on this topic, sorry šŸ˜• (This is on Windows, obviously)

eisenwinter commented 6 years ago

can confirm @C1710 , this issue only appears when you open the file directly, it wont once you open the folder (File -> Open Folder), select the tex file - everything works. if you open the file directly without the folder it will throw the mentioned error

mlouielu commented 6 years ago

Can confirmed @eisenwinter at vscode 1.21.0, using open folder and the issue didn't come up again.

reisdev commented 6 years ago

@eisenwinter , you're right. Opening the complete folder instead of just the .tex file solved the problem. I guess that's because it uses others files that are created with the .tex file.

qingdujun commented 5 years ago

ERROR: command 'vscode.previewHtml' not found.

Now, vscode.previewHtml has been removed? You also can see https://github.com/Microsoft/vscode-cosmosdb/issues/1070 .

jmussman commented 5 years ago

More to the point vscode.previewHtml was replaced by the webview api: https://github.com/Microsoft/vscode/issues/62630. All the sudden, latex preview has stopped working because I think it finally disappeared in the current update to vscode?