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.

Unexpected token < error in jsx

See original GitHub issue
    render: function() {
        return (
            <div className="jumbotron">
            </div>
        )
    }

From the code above, Im getting an error “unexpected token <” on div tag in my jsx file. Sorry if this has been asked before. I tried searching but can’t find the solution. Is this something that I have to add in my eslint config or something? Im using v0.17.1 . Thanks.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
BenoitZugmeyercommented, Mar 24, 2015

Did you set "jsx": true in "ecmaFeatures"? See: http://eslint.org/docs/user-guide/configuring#specifying-language-options

0reactions
anthonybrowncommented, May 7, 2016

👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reactjs: Unexpected token '<' Error - Stack Overflow
This happens because the react code is executed before the DOM renders. To counter this use jQuery ready() to call the render() method...
Read more >
[Bug]: Unexpected Token '<' error in jsx · Issue #13926 - GitHub
I ran into the same issue. I solved it by removing type:'module' from package.json. All reactions.
Read more >
How To Fix Unexpected Token Error for NPM Package in react ...
Are you getting this error with react -leaflet or other packages. If you are then it's most likely related to babel and there...
Read more >
Uncaught SyntaxError: Unexpected token < in React - Hashnode
js i.e. file://.../myScript.js . It throws cross origin request error. To solve this, you need to serve your local files from a server...
Read more >
Why JSX part is causing syntax error - Render community
The JSX part is causing error as: SyntaxError: dist/client/src/App.js: Unexpected token (35:8) Dec 10 01:30:11 PM 33 | }, []); Dec 10 ...
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