Parsing error: parser.parse is not a function
silverbucket opened this issue · 3 comments
Bug Template
Actual Behavior
On codeclimate.com the PR is failing but the only error message shown on the site is Parsing error: parser.parse is not a function
Expected Behavior
If there is an actual issue, it should be explained in an understandable way. However using the codeclimate CLI no errors are reported.
Steps to reproduce
- Include configurations used in your:
(1) .codeclimate.yml
(2) config files for the oss analysis tool.
- If possible, use our CLI with the debug option to provide additional info, including any stderr produced by the engine.
CODECLIMATE_DEBUG=1 codeclimate analyze -e eslint
See the PR here: sockethub/sockethub#325
Using the CLI, no errors shown.
Relevant links
- 4-6 word issue title
Hi @silverbucket - thanks for the issue and mention here 👍🏼
You're likely seeing that parsing error because of the default version of ESLint (3.19.0) used in our in-app plugin settings.
To use a different eslint version, you'll need to add a .codeclimate.yml with something like this:
Let me know if you bump into anything else! Here to help.
Thank you for the info @efueger, this solved the problem.
Maybe it would be helpful for someone.
I got error:
D, [2021-03-03T22:16:51.949006 #1] DEBUG -- : engine stderr: •• Timing: .engineConfig: 2.192s
D, [2021-03-03T22:16:54.717900 #1] DEBUG -- : engine stderr: Error: parser.parse is not a function
D, [2021-03-03T22:16:54.718042 #1] DEBUG -- : engine stderr: See our documentation at https://docs.codeclimate.com/docs/stylelint for more information.
I, [2021-03-03T22:16:55.157093 #1] INFO -- : finished engine stylelint
error: (CC::CLI::Analyze::EngineFailure) engine stylelint failed with status 1 and stderr
•• Timing: .engineConfig: 2.192s
Error: parser.parse is not a function
See our documentation at https://docs.codeclimate.com/docs/stylelint for more information.
I don't why it helps but in my case it was missing .babelrc
file. When I added it - error has gone.