iamcco / markdown-preview.nvim

markdown preview plugin for (neo)vim
MIT License
6.67k stars 277 forks source link

Nothing happens except Node.js version was displayed in status bar #637

Open rogerwzeng opened 8 months ago

rogerwzeng commented 8 months ago

Describe the bug When invoking MarkdownPreview, vim simply displays the Node.js version in the status bar and nothing happens

To Reproduce Steps to reproduce the behavior:

  1. Run Vim (I am runing Vim version 8.2.2121 on Windows 11 WSL 2 with Ubuntu 22.04)
  2. Open a *.md file
  3. Type in ':MarkdownPreview'
  4. See error 'Node.js v21.5.0'

Expected behavior Markdown rendering starts in new browser window

Screenshots ee6c88adea7e4b250568339f7cc5f38

Desktop (please complete the following information):

Log: N/A

guilpejon commented 8 months ago

Same here using macOS Sonoma and Node 17.5. I installed markdown-preview using the lazyvim config in the README.

simanga-dev commented 8 months ago

To me nothing happen at all

MarkoMin commented 8 months ago

Same as @h3ndry , nothing happens. NixOs 23.11, Node 20.10, yarn 1.22.19, installed with Lazy

simanga-dev commented 8 months ago

@MarkoMin I manage to fix it... You have to trigger a rebuild

simanga-dev commented 8 months ago

On Lazy you have to press x

MarkoMin commented 8 months ago

I did clean then install few times but with no success

simanga-dev commented 8 months ago

does your config look like this?

return {
  "iamcco/markdown-preview.nvim",
  ft = { "markdown" },

  build = "cd app && npm install",
  config = function()
    vim.g.mkdp_filetypes = { "markdown" }
    vim.keymap.set("n", "<leader>mp", ":MarkdownPreviewToggle <CR>" , {})
  end,
}
MarkoMin commented 8 months ago

It was:

-- install without yarn or npm
{
    "iamcco/markdown-preview.nvim",
    cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
    ft = { "markdown" },
    build = function() vim.fn["mkdp#util#install"]() end,
}

and it didn't work. With your config it works. Thanks

fenixc9 commented 8 months ago

same on win11 wsl2,installed by lazy

diegoulloao commented 8 months ago

same on macos using nvim 0.9.4, I tried using node 18 and 20.

diegoulloao commented 8 months ago

@MarkoMin I manage to fix it... You have to trigger a rebuild

how is that?

lethc commented 8 months ago

@diegoulloao try reinstalling the plugin, it worked for me

Flower101010 commented 7 months ago

424 try this. I had the same problem and it worked for me.

andyl commented 7 months ago

this worked for me (lazy.nvim, neovim 9.x, ubuntu 22.04)

  {
    "iamcco/markdown-preview.nvim",
    ft = { "markdown" },
    build = "cd app && yarn install",
    config = function() vim.g.mkdp_filetypes = { "markdown" } end,
  },
luren-dc commented 3 months ago

should use npm or yarn to install

sboesebeck commented 3 months ago

I have the same issue. MarkdownPreview opens the browser which then shows an error. When experimenting with manual install, yarn, npm etc. at some point just tne node version was displayed. Currently nothing is being shown. I also tried to set the log level, but that did not create a file or anything. calling mkdp#util#install() also did not help...

I am also a bit stuck here...

ryan-hafen-525 commented 1 month ago

I was having the same problem. Another comment in an issue was a fix, but if you're using lazyvim, you basically do the same thing, except change the path to:

~/.local/share/nvim/lazy/markdown-preview.nvim/app/install.sh

and I got mine up and running great.

Referenced Comment

moresol commented 6 days ago

Same, message displayed Node.js v22.9.0