question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi, I have a method in class and an error on the sign = at goToStore line definition the message is Parsing error: Unexpected token = I have no warning or error in React, where did I wrong?

export default class Storepicker extends React.Component {
   goToStore = (event) => {
    event.preventDefault();
    console.log('You changed the URL');
    // first grab the test from the box
    // second we're going to transition from / to /store/:storeIt
  }
  render() {
    return (
      <div>
        <form className="store-selector" onSubmit={this.goToStore}>
          {/* sss */}
          <h2>Please Enter A Store</h2>
          <input type="text" required placeholder="Store Name" defaultValue={getFunName()} />
          <button type="submit" className="btn">
            Visit Store <span role="img" aria-label="go">🔥</span>
          </button>
        </form>
      </div>
    );
  }
}

I lint the code in Vim 8 with Ale

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
baleedscommented, Mar 6, 2019

Okay, I was able to fix it without ejecting. I’m pretty sure the warnings don’t actually prevent this from working, in my case.

I added the following to my .eslintrc:

"parser": "babel-eslint",
"parserOptions": {
     "ecmaVersion": 6,
     "ecmaFeatures": {
         "jsx": true
     }
 },
0reactions
ljharbcommented, Mar 6, 2019

The airbnb config already sets those parserOptions - only the parser change is likely needed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Parse Error: What It Is and How to Fix It - Lifewire
A parse error is an error message you sometimes get on Android devices when an app fails to install. The message itself is...
Read more >
6 Methods to Fix Parse Error on Your Android Device - MiniTool
The Parse Error is an error message you may receive on your Android phone when an application fails to install. This error message...
Read more >
What is a parse error? - Quora
A parse error in a piece of computer code, also known as a syntax error, prevents your program from compiling. Parse errors happen...
Read more >
How to fix “Problem parsing the package error” in Android?
How to fit the Problem parsing package error? We can easily solve the problem. There are 3 possible ways. 1. Allowing installation from...
Read more >
Parsing Error in Windows 10 - Microsoft Community
Sorry to ask again but I cannot fix the Parsing Error (0xC00CE56). I have tried many ways but it is still not working...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found