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:
- Created 8 years ago
- Comments:5 (1 by maintainers)
Top 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 >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 FreeTop 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
Top GitHub Comments
Did you set
"jsx": true
in"ecmaFeatures"
? See: http://eslint.org/docs/user-guide/configuring#specifying-language-options👍