markdown-preview.nvim icon indicating copy to clipboard operation
markdown-preview.nvim copied to clipboard

NO matching autocommands: User NvimMkdpRpcExit

Open richtong opened this issue 3 years ago • 5 comments

Describe the bug When I try to run :MarkdownPreview from the command line in a README.md file, instead of getting the file produced, I get the error message

No matching autocommands: User NvimMkdpRpcExit

To Reproduce Steps to reproduce the behavior:

  1. Follwing the README.md I had added to .vimrc
Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']}
  1. The run :PlugInstall
  2. open a README.md
  3. Run :MarkdownPreview

Expected behavior In the past I would expect to see a web page open with the HTML displayed

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: MacOS Monterey 12.1
  • Machine; Apple MacBook Pro M1 Max

Log:

Not sure where is the log file?

richtong avatar Jan 06 '22 21:01 richtong

I'm running into similar issues and I think the M1 chip is the problem here:

https://github.com/iamcco/markdown-preview.nvim/blob/master/app/install.sh#L78-L83

However on an M1 macbook:

$ uname -sm
Darwin arm64

I'm not sure what the downloaded binary does or where it's being built, but just forcing it to grab the macos binary won't work as that'll return the following error:

$ ./markdown-preview-macos
zsh: bad CPU type in executable: ./markdown-preview-macos

bartj3 avatar Feb 21 '22 10:02 bartj3

Disregard that, I'm still not sure what the binary is for, but the suggestion at https://github.com/iamcco/markdown-preview.nvim/issues/319#issuecomment-870231018 to just yarn install did the trick for me.

bartj3 avatar Feb 21 '22 10:02 bartj3

Can confirm suggestion from @bartj3 link did it form with one caveat.

I'm on an M1 mac so yarn install inside the plugin directory was failing via node-gyp when installing fsevents. The thing is that fsevents already has an M1 ready version. so just do:

-yarn add fsevents (version 2.2.2 and up support M1 Macs)

  • yarn install
  • restart vim
  • do :MarkdownPreview inside a .md file

Dudemullet avatar Apr 15 '22 20:04 Dudemullet

@Dudemullet 's method works for me. Thanks a lot.

yuchun1214 avatar Apr 17 '22 08:04 yuchun1214

I don't have a M1 mac, so there no binary bundle build for arm64 of mac, and it will download the x86 version. please use the yarn install way instead.

iamcco avatar May 13 '22 10:05 iamcco