shd101wyy / vscode-markdown-preview-enhanced

One of the "BEST" markdown preview extensions for Visual Studio Code
https://shd101wyy.github.io/markdown-preview-enhanced
Other
1.41k stars 170 forks source link

Different Uncaught TypeError: Cannot read property '1' of null #1300

Open Nathan-Furnal opened 4 years ago

Nathan-Furnal commented 4 years ago

Hi, when I'm trying to use pandoc it's all fine but when I'm adding latex files or python plots, though the preview works ; pandoc throws an error and doesn't convert to PDF.

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.40.0 x64 Electron: 3.1.10 OS: Ubuntu 19.04 Thrown From: markdown-preview-enhanced package 0.16.3

Stack Trace

Uncaught TypeError: Cannot read property '1' of null

At /home/nathan/.atom/packages/markdown-preview-enhanced/node_modules/@shd101wyy/mume/out/src/pdf.js:48

TypeError: Cannot read property '1' of null
    at items.sort (/packages/markdown-preview-enhanced/node_modules/@shd101wyy/mume/out/src/pdf.js:48:74)
    at Array.sort (native)
    at fs.readdir (/packages/markdown-preview-enhanced/node_modules/@shd101wyy/mume/out/src/pdf.js:46:35)
    at FSReqWrap.oncomplete (fs.js:169:20)

Commands

     -9:53.8.0 core:save (input.hidden-input)
     -9:45.1.0 core:backspace (input.hidden-input)
     -9:35.1.0 core:save (input.hidden-input)
  6x -9:27.7.0 core:backspace (input.hidden-input)
     -7:43.4.0 core:save (ul.list-inline.tab-bar.inset-panel)
  4x -7:41.6.0 markdown-preview-enhanced:toggle (ul.list-inline.tab-bar.inset-panel)
  2x -7:33.6.0 core:backspace (input.hidden-input)
     -6:48.2.0 core:confirm (input.hidden-input)
 12x -4:14.8.0 core:backspace (input.hidden-input)
  2x -3:56.7.0 core:save (input.hidden-input)
  2x -3:49.3.0 markdown-preview-enhanced:toggle (input.hidden-input)
     -2:58.7.0 markdown-preview-enhanced:run-code-chunk (input.hidden-input)

Non-Core Packages

asciidoc-assistant 0.2.3 
asciidoc-image-helper 1.0.1 
asciidoc-preview 2.13.1 
autocomplete-asciidoc 0.1.2 
language-asciidoc 1.11.0 
markdown-preview-enhanced 0.16.3 
script 3.18.1 
wcork commented 4 years ago

Same issue:

Atom: 1.40.1 x64 Electron: 3.1.10 OS: Linux Mint Thrown From: markdown-preview-enhanced package 0.16.3

Stack Trace

Uncaught TypeError: Cannot read property '1' of null

At /home/wcork/.atom/packages/markdown-preview-enhanced/node_modules/@shd101wyy/mume/out/src/pdf.js:47

TypeError: Cannot read property '1' of null
    at items.sort (/packages/markdown-preview-enhanced/node_modules/@shd101wyy/mume/out/src/pdf.js:47:74)
    at Array.sort (native)
    at fs.readdir (/packages/markdown-preview-enhanced/node_modules/@shd101wyy/mume/out/src/pdf.js:46:35)
    at FSReqWrap.oncomplete (fs.js:169:20)

Commands

     -1:00.4.0 core:confirm (input.hidden-input)
     -1:00.0 latex:show-log (webview.)
     -0:56.7.0 command-palette:toggle (atom-pane.pane)
  3x -0:55 core:backspace (input.hidden-input)
     -0:51.4.0 core:confirm (input.hidden-input)
     -0:51.4.0 command-palette:toggle (atom-pane.pane)
     -0:45.3.0 core:move-down (input.hidden-input)
     -0:45.1.0 core:confirm (input.hidden-input)
     -0:45.1.0 command-palette:show-hidden-commands (atom-pane.pane)
  2x -0:43.4.0 command-palette:toggle (input.hidden-input)
     -0:41.5.0 editor:consolidate-selections (input.hidden-input)
     -0:41.5.0 core:cancel (input.hidden-input)
     -0:23.1.0 command-palette:toggle (input.hidden-input)
     -0:13.7.0 core:move-down (input.hidden-input)
     -0:11.5.0 editor:consolidate-selections (input.hidden-input)
     -0:11.5.0 core:cancel (input.hidden-input)

Non-Core Packages

atom-latex 0.8.11 
latex 0.50.2 
markdown-preview-enhanced 0.16.3 
omni-ruler 0.6.0 
wcork commented 4 years ago

An interesting fix for this: Delete the assets folder of the project to allow building from pandoc again.

Nathan-Furnal commented 4 years ago

@wcork thanks for the fix, do you have to do that often ?