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.
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 ?
/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.
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.