Skip to content

Parsing error: parser.parse is not a function #512

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task
silverbucket opened this issue Feb 17, 2021 · 3 comments
Closed
1 task

Parsing error: parser.parse is not a function #512

silverbucket opened this issue Feb 17, 2021 · 3 comments
Assignees

Comments

@silverbucket
Copy link

silverbucket commented Feb 17, 2021

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

  1. Include configurations used in your:

    (1) .codeclimate.yml

    (2) config files for the oss analysis tool.

  1. 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

sockethub/sockethub#325

@silverbucket silverbucket changed the title Parsing error: parser.parse is not a function Parsing error: parser.parse is not a function Feb 17, 2021
@efueger
Copy link
Member

efueger commented Feb 17, 2021

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.

@efueger efueger closed this as completed Feb 17, 2021
@silverbucket
Copy link
Author

Thank you for the info @efueger, this solved the problem.

@zavoloklom
Copy link

zavoloklom commented Mar 3, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants