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.

Uncaught SyntaxError: Unexpected token ;

See original GitHub issue

When I include this library from a webpack project,

import jsPDF from 'jsPDF';

Which imports jspdf.min.js

I get this error at the following line:

var o = t.parseBackgroundSize(e, n.image, r),
      s = t.parseBackgroundPosition(e, n.image, r, o),
      a = t.parseBackgroundRepeat(r);

I don’t see the error here. Can anyone help me figure out why it’s happening?

btw, I cannot use the jspdf.debug.js either because there are a ton of errors in it.

Issue Analytics

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

github_iconTop GitHub Comments

7reactions
kishekcommented, May 7, 2016

+1 Problem still occurs on latest release.

5reactions
ayozebarreracommented, Jul 8, 2016

I still can’t use jsPDF with webpack… :\

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught SyntaxError: Unexpected token : - Stack Overflow
An "unexpected token" is likely some illegal character code. Such a code is likely not to show up when you print to console....
Read more >
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 >
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 >
Uncaught SyntaxError: Unexpected token < - JavaScript - iDiallo
All it means is that the interpreter is expecting JavaScript or JSON and you are feeding it HTML/XML. If you don't think you...
Read more >
How to Fix Uncaught SyntaxError: Unexpected token '{'
The JavaScript exceptions " unexpected token " occur when a specific language construct was expected, but something else was provided.
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