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?
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"
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.