Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rogerwzeng opened this issue Jan 5, 2024 · 21 comments
Open

Comments

@rogerwzeng
Copy link

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):

  • OS: Windows 11
  • WSL 2 with Ubuntu 22.04 LTS

Log: N/A

@guilpejon
Copy link

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

@simanga-dev
Copy link

To me nothing happen at all

@MarkoMin
Copy link

MarkoMin commented Jan 8, 2024

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

@simanga-dev
Copy link

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

@simanga-dev
Copy link

On Lazy you have to press x

@MarkoMin
Copy link

MarkoMin commented Jan 8, 2024

I did clean then install few times but with no success

@simanga-dev
Copy link

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
Copy link

MarkoMin commented Jan 8, 2024

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
Copy link

fenixc9 commented Jan 13, 2024

same on win11 wsl2,installed by lazy

@diegoulloao
Copy link

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

@diegoulloao
Copy link

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

how is that?

@lethc
Copy link

lethc commented Jan 15, 2024

@diegoulloao try reinstalling the plugin, it worked for me

@Flower101010
Copy link

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

@andyl
Copy link

andyl commented Feb 10, 2024

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,
  },

@Pandoks
Copy link

Pandoks commented Feb 12, 2024

For me nothing happens. If I rebuild from uninstalling and reinstalling, it works once, but then it stops working again.

config:

return {
  "iamcco/markdown-preview.nvim",
  ft = { "markdown" },
  build = function()
    vim.fn["mkdp#util#install"]()
  end,
  keys = {
    { "<leader>p", "<cmd>MarkdownPreviewToggle<cr>", mode = "n", desc = "Toggle previewer" },
  },
}

@luren-dc
Copy link

luren-dc commented Jun 8, 2024

should use npm or yarn to install

@sboesebeck
Copy link

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
Copy link

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
Copy link

moresol commented Sep 22, 2024

Same, message displayed Node.js v22.9.0

@markodraisma
Copy link

Same problem, referenced fix from @ryan-hafen-525 works for me too.

@xandery-geek
Copy link

Thank you @ryan-hafen-525. The referenced comment works for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests