-
Notifications
You must be signed in to change notification settings - Fork 131
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
bug: Windows unable to run prettier from node_modules #236
Comments
I have the exact same problem on my machine Edit: I have this problem while running GitBash, on Powershell it's working as expected. |
what i did is i went to return M.find_executable({ "node_modules/.bin/" .. cmd .. ".cmd" }, cmd) |
I have a related error with Windows path issues but actually think it is a bit different. If I have a space in my path at all of my git repository (where prettier is installed in node_modules) then I get the following error: Notice the actual start to my path to my git repo locally has a space here which is exactly where the error above cutoff. |
If I take the exact same project and simply clone it to like c:/temp on my windows machine (no spaces then in path) then everything works fine. |
I believe the issue with using the |
@stevearc thanks! I will test this afternoon and let you know. |
Neovim version (nvim -v)
0.9,1
Operating system/version
Windows 11 22H2
Add the debug logs
log_level = vim.log.levels.DEBUG
and pasted the log contents below.Log file
Formatter 'prettier' error in jobstart: Vim:E903: Process failed to start: no such file or directory: "D:/projects/projectName/src/ClientApp/node_modules/.bin/prettier"
Describe the bug
Conform wasn't able to run prettier of node_modules, same thing happened on two different PCs.
There was a file called "prettier" (together with prettier.cmd and prettier.ps1) in my
node_modules/.bin
but it couldn't run it. I ended up overriding conform'sutil.lua
file and added.. ".cmd"
at the end of the path. After that it started running just fine.Steps To Reproduce
Expected Behavior
Should just format the file as usual
Minimal example file
No response
Minimal init.lua
Additional context
running of git-bash / zsh
The text was updated successfully, but these errors were encountered: