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

See original GitHub issue

Hi,

I’m starting from a fresh install following the steps in the readme and getting 14 errors like the sample below

ERROR in ./src/components/App/App.js
Module build failed: SyntaxError: /src/components/App/App.js: Unexpected token (11:0)
   9 | import Footer from '../Footer';
  10 |
> 11 | @withContext
     | ^
  12 | @withStyles(styles)

I’m seeing this with any file that references the @ symbol in it. I’m assuming this is on my end as no one else has the same issue, but I’m stuck as to what the problem is.

Any pointers or suggestions would be appreciated.

Thank you,

Cary

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Anenthcommented, Aug 30, 2015

@koistya .babelrc file was missing ! worked fine after i created the file. Thanks

0reactions
ro0sterjamcommented, Sep 1, 2015

My god that was the problem all along. I’ve been ripping my hair out about this. I too was missing the .babelrc file. Thank you so much.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SyntaxError: Unexpected token - JavaScript - MDN Web Docs
The JavaScript exceptions "unexpected token" occur when a specific language construct was expected, but something else was provided.
Read more >
JavaScript Error Handling: Unexpected Token - GeeksforGeeks
Not follow them throws an error.An unexpected token occurs if JavaScript code has a missing or extra character { like, ) + –...
Read more >
How to fix JavaScript unexpected token error
As you write your JavaScript application, the unexpected token error always occurs because JavaScript expected a specific syntax that's not ...
Read more >
How to fix: "SyntaxError: Unexpected token" in JavaScript
One common cause of the SyntaxError: Unexpected token error is a missing semicolon. In JavaScript, semicolons are used to indicate the end of...
Read more >
syntax error: unexpected token - javascript - Stack Overflow
The error SyntaxError: Unexpected token < likely means the API endpoint didn't return JSON in its document body, such as due to a...
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