Unexpected token (JSX syntax)
See original GitHub issueI tried running the example script and I’m getting this error:
SyntaxError: C:/.. ../routing.jsx: Unexpected token
Running the script using:
node sitemap-builder.js
And im requiring ‘babel-register’ as instructed.
Would appreciate the help!
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
babel-loader jsx SyntaxError: Unexpected token [duplicate]
I'm using babel-loader in webpack to help me convert jsx into js, but it seems like babel can't understand jsx syntax. Here are...
Read more >[Bug]: Unexpected Token '<' error in jsx #13926 - babel/babel
I ran into the same issue. I solved it by removing type:'module' from package.json. All reactions.
Read more >Uncaught SyntaxError: Unexpected token in JSX
I am using Parcel to build my React app. It's throwing a syntax error: unexpected token. HTML: <!DOCTYPE html> <html lang="en"> <head> <meta ......
Read more >JSX
Uncaught SyntaxError : Unexpected token <. Because the bracket syntax (JSX) has not been compiled to JavaScript. To install the JSX compiler (Babel)....
Read more >Why JSX part is causing syntax error: unexpected token ...
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
Yep, resolved. Even though this is a fast and simple solution I ended up creating a project of my own using PhantomJS to create a comprehensive sitemap. Even though my site defines ~8 routes I’ve got over 7200 url variations! Anyway, still a great job! Thanks @kuflash 😃
@frg problem is resolved?