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.

"SyntaxError: Unexpected token"

See original GitHub issue

I’m seeing the SyntaxError: Unexpected token when using the syntax {...o}, but only occasionally.

It only occurs when a file gets to a certain size, but does not seem to be bound by size alone.

I have not yet been able to produce a reproducible test.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
tjconceptcommented, Jul 26, 2020

A note to future me: envify is causing the same issue due to an outdated “esprima” dependency. https://github.com/browserify/tinyify has a patched version.

0reactions
tjconceptcommented, Mar 26, 2019

Trashing everything npm-ish and reinstalling packages solved the above, so I guess it was some other mishap. Thanks again.

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 >
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 >
SyntaxError: Unexpected token in JavaScript | bobbyhadz
The "Uncaught SyntaxError: Unexpected token" occurs for multiple reasons: · The error is also caused if you're making an HTTP request to a...
Read more >
Have a JavaScript Unexpected Token Error? Check Your Syntax
The JavaScript's parser expects tokens and symbols in a particular order, with relevant values or variables in between. Often, an Unexpected ...
Read more >
JavaScript SyntaxError - Unexpected token - GeeksforGeeks
This JavaScript exceptions unexpected token occur if a specific language construct was expected, but anything else is typed mistakenly.
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