Open tardiobscurus opened 2 years ago
I get a similar error. After the initial :MarkdownPreview
command, the browser loads and shows the preview. Then, after a time, I get an error saying:
Error detected while processing function 6:
line 3: [LiveServer] <--- Last few GCs ---> [13195:0x559b799edfc0] 77584 ms: Mark-Compact 2036.8 (2090.4) -> 2030.0 (2091.6) MB, 1235.00 / 0.00 ms (average mu = 0.103, current mu = 0.010) allocation failure; scavenge might not succeed [13195:0x559b799edfc0] 78819 ms: Mark-Compact 2038.0 (2091.6) -> 2031.1 (2092.9) MB, 1222.54 / 0.00 ms (average mu = 0.059, current mu = 0.010) allocation failure; scavenge might not succeed <--- JS stacktrace ---> FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
And then the browser gives the error mentioned by OP.
I did some investigation here and found live-server
starts on the current working directory (where [neo]vim was started). So, if you start [neo]vim in $HOME, live-server
will watch every file under it for changes which causes lots of issues and reload non-stop. I have a fix here which restricts the root to temp mount_path
: https://github.com/jtpsh/nvim-markdown-preview/commit/e64c258f41fcfdbc3fd11b4dfa13e64f9cdfb085
Not sure if it will cause some issues but it works well for me.
versions:
PS: I have done
:MarkdownPreview github
and other default themes; still produce the same problem. I've checked if there is an update onnode-js
,live-server
andpandoc
. Seems thatnode-js
had some changes, but is minor line changes so no affect on that.Whenever I run
:MarkdownPreview
browser shows a connection error of site not being reached (shown image below):It might be from the wrong host using the preview, which is
127.0.0.1
with port8080
. If so, how would I change it in the config file - asking for a friend.