iamcco / iamcco/markdown-preview.nvim

[BUG with Solution] `:MarkdownPreview` prints `Node.js v22.6.0` and does nothing

Open
#695 12 comments 74 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
8k
Forks
411
PR merge metrics
No merged PRs in 30d

Description

### **Describe the bug**
I installed this plugin with the following setup
```lua
{
"iamcco/markdown-preview.nvim",
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
ft = { "markdown" },
build = function() vim.fn["mkdp#util#install"]() end,
}
```
When I tried to run `:MarkdownPreview` it just printed `Node.js v22.6.0` and did nothing.

### **To Reproduce**
Steps to reproduce the behavior:
1. Add the plugin with lazy
2. Open a markdown file
3. Do `:MarkdownPreview`

### **Expected behavior**
A browser window should open with the preview of the markdown file.

### **Desktop**
- OS: Arch Linux
- WM: Hyprland
- Browser: Brave Browser

### **Solution**
I saw [this](https://github.com/iamcco/markdown-preview.nvim/issues/628) issue and tried the following:
```bash
cd ~/.local/share/nvim/lazy/markdown-preview.nvim
npm install
```
I then tried to do `MarkdownPreview` and it worked !!!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.