Vim-prettier: Upgraded to Node v10 - Pretter:Failed to parse buffer

Created on 4 May 2018  路  4Comments  路  Source: prettier/vim-prettier

Do you want to request a feature or report a bug?
Bug

What is the current/expected behavior?
Upon trying to save a file which vim-prettier typically formats (.js), it now throws the error: "Prettier: failed to parse buffer.", regardless of the file contents. Adjusting various .vimrc settings didn't resolve the issue.

What version of vim-prettier are you using - (output of :PrettierVersion) ?
0.2.6

What version of prettier are you using - (output of :PrettierCliVersion) ?
cosmiconfig requires at least version 4 of Node, please upgrade
(node --version = v10.0.0)

What is your prettier executable path - (output of :PrettierCliPath) ?
/Users/chrisball/.vim/bundle/vim-prettier/node_modules/.bin/prettier

Did this work in previous versions of vim-prettier and/or prettier ?
Yes, never had a problem before the node upgrade.

triage

Most helpful comment

I figured it out - turns out after doing a vundle :PluginUpdate, I needed to manually re-run 'npm install' to update the dependency version of prettier that vim-prettier relies on. Seems to be working now.

All 4 comments

Hi @christopherball,

Thanks for reporting this issue. Will try to reproduce it now and will comment back on this issue

Hi @christopherball ,

I tried to reproduce locally without success. In order to better assist you could you try providing a bit more info ?

  • can you try on the command line giving me the output of /Users/chrisball/.vim/bundle/vim-prettier/node_modules/.bin/prettier --version

"cosmiconfig requires at least version 4 of Node, please upgrade"

I figured it out - turns out after doing a vundle :PluginUpdate, I needed to manually re-run 'npm install' to update the dependency version of prettier that vim-prettier relies on. Seems to be working now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Luobata picture Luobata  路  7Comments

hitochan777 picture hitochan777  路  14Comments

axelav picture axelav  路  4Comments

mitermayer picture mitermayer  路  6Comments

larister picture larister  路  4Comments