Error: Couldn't resolve parser "babel"
See original GitHub issueSince Jan 25, this package is breaking on Sublime 3 with following error:
------------------
JsPrettier ERROR
------------------
Prettier reported the following error(s):
[warn] Ignored unknown option `--html-whitespace-sensitivity=css`.
[error] Error: Couldn't resolve parser "babel"
Process finished with exit code 1
NPM versions:
- prettier@1.16.1
- babel-cli@6.26.0
- babel@6.23.0
Sublime Packages:
- Babel@8.6.3
- JSPrettier@1.23.1
OSX 10.13.6
Any suggestions?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:13
- Comments:11 (1 by maintainers)
Top Results From Across the Web
JsPrettier Sublime Error 'Couldn't Resolve Parser "babel"'
Currently working in a project with create-react-app. JsPrettier version 1.24.0 Sublime version 3.1.1. These are my Babel settings: "debug": ...
Read more >Why does running prettier check return error "Couldn't resolve ...
ts' with a prettier config shown below, I receive the error stating that the babel-ts parser is not resolved. I'm currently using prettier...
Read more >JsPrettier Sublime Error 'Couldn't Resolve Parser "babel"' (2 ...
JsPrettier Sublime Error ' Couldn't Resolve Parser " babel "'Helpful? Please support me on Patreon: https://www.patreon.com/roelvandepaarWith ...
Read more >@babel/eslint-parser - npm
If you have an issue, please first check if it can be reproduced with the default parser and with the latest versions of...
Read more >babel/parser
errorRecovery: By default, Babel always throws an error when it finds some invalid code. When this option is set to true , it...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Prettier 1.16 or greater now appears to be a requirement here, so removing it from your
package.json
and installing the latest version will fix the problem.The issue appears to be that Prettier <=1.15 uses the plugin “babylon” but 1.16 uses “babel.” There is the
parser
option available for CLIprettier
but the Sublime plugin sets it automatically, overriding anything you set in the Sublime plugin setting. If we could change the plugin name, we could fix the problem ourselves.As it is I now have to submit a PR to my team to change the package.json just to fix my Sublime Text, which is not ideal.
I reinstalled the npm package prettier and it started working for me.
npm install -g prettier
Hope that helps.