Closed GitHubonline1396529 closed 5 months ago
If here's more imformation about the error, I think, maybe I can fix it myself?
However, the only thing I know is Node.js v18.17.0
and I don't know what does that means...
Did you recently update node? I was having the same issue. I was able to get this working again by removing the plugin then re-adding it. I figure this re-triggered the plugin's build step, "cd app && npm install". Hope that helps @GitHubonline1396529 !
Did you recently update node? I was having the same issue. I was able to get this working again by removing the plugin then re-adding it. I figure this re-triggered the plugin's build step, "cd app && npm install". Hope that helps @GitHubonline1396529 !
Hi @nodu,
Thank you SO MUCH for your suggestion! Although I'm not a Javascriptist and knew nothing about Node.js, you reminded me to check the plugin folder which Node.js supposed to build the project in and, yes, I've found a resolution to this issue, and here it is:
When using vim-plug in MSYS2, Vim creates a new .vim
directory under MSYS2's /home
directory rather than using the default Windows 10 .vim
directory located at C:\Users\<userName>\.vim\
. This led to two separate instances of the same plugin being installed without interfering with each other.
While checking the plugin folder under MSYS2's /home
I found a childfolder named bin
there with no Binary files in it, so I download markdown-preview-win.exe
in GitHub Releases and manually added the markdown-preview-win.exe
binary to the ~/.vim/plugged/markdown-preview.nvim/app/bin
directory.
This action corrected the plugin's functionality, suggesting that the binary file was not automatically placed or built during the plugin's installation process through :PlugInstall
.
markdown-preview.nvim
attempts to install its dependencies via npm
or yarn
, the build process for binary components might silently fail due to path or environment mismatches specific to MSYS2, with no ERROR outputs.
Environment
Description
Brief Description
I am encountering an issue where
markdown-preview.nvim
does not function as expected. I have set up everything according to the documentation, but when I attempt to use the:MarkdownPreview
command in vim launched in MSYS2's shell, it fails without providing any error messages beyond a note about Node.js v18.17.0.Expected Behavior
The plugin should initialize and open a markdown preview window in the browser without any errors.
Actual Behavior
When executing
:MarkdownPreview
within vim launched in MSYS2's shell, the operation fails with no detailed error message, only indicating an issue with Node.js v18.17.0. However, this issue does not occur when using PowerShell or from the context menu.Steps to Reproduce
vim-plug
as the plugin manager and addiamcco/markdown-preview.nvim
to the.vimrc
configuration:An Image
Additional Information
Here are some of my attempts: running the following commands in MSYS2's shell all ends up with the same error.
Also I've tried to install node.js in MSYS2 with
pacman
:and the only difference is that the error message became
Node.js v21.6.2
.Logs
Didn't find any logs.