-
-
Notifications
You must be signed in to change notification settings - Fork 139
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
Prettier: failed to parse buffer #268
Comments
Hi, I'm receiving the same error. .vimrc
:PrettierVersion 1.0.0-beta MacVim 8.2 |
Same here
More details
|
I had the same issue with old versions. |
I found the workaround. put this in vim config
|
Thanks @zirho I was removed
then put your config. It's working for me. |
i can confirm that @zirho 's solution works for me! |
I too confirm @zirho 's solution worked for me! |
this might be related to error |
possibly related to NVM and the default version of node being set in the system. |
I can confirm that @zirho's solution also worked for me :), really enjoying this plugin, thank you to the devs for creating this it is wonderful to get Prettier support inside of Neovim! |
FWIW and in case it's a clue for the root cause, I only needed one line:
from @zirho's solution to get rid of |
It is potentially an issue with the php plugin, though I've no idea. Maybe it is overwriting the available trailing comma options? I'm getting the same issue on my Mac setup. If I remove the plugins from the I would also deeply appreciate some way of getting more information out of prettier when seeing the "failed to parse buffer" error. I didn't see any option but is there some kind of verbose logging mode to help debug this? I ended up adding |
Possibly also because the It might make sense to specify a much looser constraint. Lines 16 to 19 in bc7ae99
|
Thank you so much – this finally fixed my issue! |
This is indeed related to prettier-php version being too old. The problem was fixed: |
addresses prettier#268
Not fixed |
I stumbled across this issue after searching for the |
This works for me but I want to run prettier with the defaults so it's not an ideal solution.
What's the best way to check which version of node vim-prettier is running and is there a way to configure a version for vim-prettier? NVM is currently set to current LTS |
This is causing me issues for me now :( Solutions I tried:
My versions:
|
In my experience this issue is caused by me renaming the root directory of a directory containing node packages. My fix has been to delete the
|
This fixed it for me. |
This comment was marked as outdated.
This comment was marked as outdated.
I tried this but it did not work for me on my
I don't face this issue on my linux machine however |
Do you want to request a feature or report a bug?
In NeoVim show error
Prettier: failed to parse buffer
in I save JavaScript file.This is my
init.vim
configureWhat is the current/expected behavior?
What version of
vim-prettier
are you using - (output of:PrettierVersion
) ?1.0.0-beta
What version of
prettier
are you using - (output of:PrettierCliVersion
) ?2.1.2
What is your
prettier
executable path - (output of:PrettierCliPath
) ?Users/dangvanthanh/.config/nvim/plugged/vim-prettier/node_modules/.bin/prettier
The text was updated successfully, but these errors were encountered: