0

In Sublime Text 3, I'm attempting to use jsPrettier (which worked fine previously) and getting this error in the console: TypeError: parser.parse is not a function. I've tried reinstalling prettier (globally) and jsPrettier (ST3 package) several times, as well as restarting Sublime. How do I get prettier working again?

dangerismycat
  • 824
  • 2
  • 11
  • 18

1 Answers1

0

This is a pathing issue. Somehow Sublime lost the path to prettier. Getting that path (from which prettier) and adding it as prettier_cli_path to JsPrettier.sublime-settings (from Preferences -> Package Settings -> JsPrettier -> Settings - User) fixes the issue.

{
    "prettier_cli_path": "~/path/to/prettier"
}
dangerismycat
  • 824
  • 2
  • 11
  • 18