JsPrettier Sublime Error 'Couldn't Resolve Parser "babel"'
Note: If you want to use the local install of prettier in your project, omit the -g
from all commands
First, update your global version of prettier:
npm update -g prettier
npm list -g prettier
now gives me [email protected]
Now update your JsPrettier User settings (Sublime Text > Preferences > Package Settings > JsPrettier > Settings - User) and set the "prettier_cli_path"
to point at your global bin
// JsPrettier.sublime-settings
{
...
"prettier_cli_path": "/Users/abby/.nvm/versions/node/v10.14.1/bin/prettier",
...
}
(Check what the correct path is by running npm root -g
and update it to the prettier bin)