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.45k stars 172 forks source link

Occasionally Unable to Toggle Preview Dialog #1515

Open ihmcjacky opened 6 years ago

ihmcjacky commented 6 years ago

Occasionally I cannot toggle the markdown preview enhanced dialog, the following console log has been captured from atom

Uncaught (in promise) Error: watch /home/myName/.mume ENOSPC
    at _errnoException (util.js:1024:11)
    at FSWatcher.start (fs.js:1386:19)
    at Object.fs.watch (fs.js:1412:11)
    at Object.<anonymous> (/home/myName/.atom/packages/markdown-preview-enhanced/node_modules/@shd101wyy/mume/out/src/mume.js:43:12)
    at Generator.next (<anonymous>)
    at fulfilled (/home/myName/.atom/packages/markdown-preview-enhanced/node_modules/@shd101wyy/mume/out/src/mume.js:4:58)
    at <anonymous>

Please advice, thank you

2E0PGS commented 5 years ago

I had this same issue just now. I found it's because of Linux watches.

I saw an error in the console of Atom referencing watches and found Ubuntu 18.04 has a lower cat /proc/sys/fs/inotify/max_user_watches than previous versions for some reason.

I set it to a higher number and this package worked fine after reloading it: # echo 524288 > /proc/sys/fs/inotify/max_user_watches

2E0PGS commented 5 years ago

shd101wyy/markdown-preview-enhanced#732

extraymond commented 5 years ago

Can confirm the workaround @2E0PGS provided solve my problem with the following setup:

  1. OS: ubuntu 18.04
  2. Atom: 1.38.2(snap package)
  3. Extension: 0.16.3