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 (JSX syntax)

See original GitHub issue

I tried running the example script and I’m getting this error: SyntaxError: C:/.. ../routing.jsx: Unexpected token

image

Running the script using: node sitemap-builder.js

And im requiring ‘babel-register’ as instructed.

Would appreciate the help!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
frgcommented, Jun 29, 2016

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 😃

0reactions
kuflashcommented, Jun 29, 2016

@frg problem is resolved?

Read more comments on GitHub >

github_iconTop 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 >

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